Save point trying to fix the /etc overwrite problem

This commit is contained in:
kake26 2024-05-23 17:45:46 -05:00
parent 640da30d98
commit 2a76825ad9
Signed by: kake26
GPG key ID: E8AFC43591876B4D
5 changed files with 1441 additions and 2 deletions

22
verify.bash Normal file
View file

@ -0,0 +1,22 @@
#!/bin/bash
pkgsum="pkgsum"
hostsum="hostsums"
hashapp="sha256sum"
# this module will check to see if /etc matches whats in the restore
find /etc -type f -exec $hashapp '{}' \; > $hostsum
# I know this is a cheap trick, but it works
if [ -f $pkgsum ] && [ -f $hostsum ]; then
diff -q $pkgsum $hostsum
if [ $? -eq 0 ]; then
echo "Verify passed"
else
echo "Verify failed"
fi
else
echo "Checksum files not found"
fi