Skip to content

Commit 2df10dd

Browse files
committed
simplify rhash usage
1 parent aa3f9a5 commit 2df10dd

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

makefiles/in_chroot/install.sh

+2-6
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,7 @@ yarn cache clean --all
190190
VERIFY_DIRECTORIES="/etc /usr /opt"
191191
HASH_LOCATION="/opt/integrity_check"
192192
mkdir -p $HASH_LOCATION
193-
# delete hashes so they aren't included in the new files list
194-
rm -f $HASH_LOCATION/hashes.txt; rm -f $HASH_LOCATION/files.txt
195-
find $VERIFY_DIRECTORIES -type f > $HASH_LOCATION/files.txt
196-
# also hash file list
197-
echo "$HASH_LOCATION/files.txt" >> $HASH_LOCATION/files.txt
198-
sudo rhash --sha256 --file-list $HASH_LOCATION/files.txt -o $HASH_LOCATION/hashes.txt
193+
194+
sudo rhash --sha256 --recursive $VERIFY_DIRECTORIES -o $HASH_LOCATION/hashes.txt
199195

200196
echo "axiom-update finished. Software version is now $(git describe --always --abbrev=8 --dirty)."

software/scripts/axiom_file_check.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
HASH_LOCATION="/opt/integrity_check"
33

44
echo "Checking Axiom system files... (this might take a while)"
5-
output=$(sudo rhash -c --skip-ok --brief $HASH_LOCATION/hashes.txt)
5+
output=$(sudo rhash --percents -c --skip-ok --brief $HASH_LOCATION/hashes.txt)
66

77
if [ -z "$output" ]; then
88
echo "No problems detected, all files are in factory state."

0 commit comments

Comments
 (0)