From 92dcb3e01d5fb396fb0c1882fd24c5da722051b9 Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 30 Sep 2015 00:12:40 +0200 Subject: [PATCH] honor comments in config file --- hashboot.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hashboot.sh b/hashboot.sh index 1651975..c6e993e 100755 --- a/hashboot.sh +++ b/hashboot.sh @@ -58,7 +58,7 @@ then #Look for config file and set ${MBR_DEVICE}. if [ -f ${CONFIG_FILE} ] then - MBR_DEVICE=$(grep mbr_device ${CONFIG_FILE} | awk '{print $3}') + MBR_DEVICE=$(grep ^mbr_device ${CONFIG_FILE} | awk '{print $3}') [ $? != 0 ] && die 9 "Error reading config file" #If not found, create one and ask for ${MBR_DEVICE} else @@ -82,6 +82,7 @@ then else die 7 "Error writing ${DIGEST_FILE}" fi + #Backup of good files tar -czpPf ${BACKUP_FILE} ${MBR_TMP} /boot ${DIGEST_FILE} if [ $? == 0 ]