Index: scripts/crypt_setup.sh =================================================================== diff -u -r3f328e08487912536ea5f9633014d08fd2010dac -rb003a83a376146935b9c0f707fc838a471738a9c --- scripts/crypt_setup.sh (.../crypt_setup.sh) (revision 3f328e08487912536ea5f9633014d08fd2010dac) +++ scripts/crypt_setup.sh (.../crypt_setup.sh) (revision b003a83a376146935b9c0f707fc838a471738a9c) @@ -42,6 +42,7 @@ LOC_MAP="/dev/mapper/"$LOC_DIR LOC_VAR="/var/"$LOC_DIR LOC_CRC="settings.crc" +LOC_CFG="/home/root/.config" DEV_TYP="crypto_LUKS" DEV_MNT="/dev/mapper/configurations on /var/configurations type ext4 (rw,relatime)" @@ -69,16 +70,21 @@ } function checkShaSum() { - cd "$LOC_VAR" + if [ "$(whoami)" == "root" ]; then + cd "$LOC_CFG" + else + cd "$LOC_VAR" + fi if [ ! -f "$LOC_CRC" ]; then echo "Settings CRC failed [crc file does not exists]" exit $ERR_CRYPTSETUP_MOUNT_CRC fi out=$( sha256sum -c "$LOC_CRC" | grep "FAILED" ) - cd - + echo "$(pwd)out" > /tmp/checksum.log + cd - if [ ! "$out" == "" ]; then echo "Settings CRC FAILED" exit $ERR_CRYPTSETUP_MOUNT_CRC