mirror of https://schlomp.space/tastytea/hashboot
honor comments in config file
parent
e0f28e36f8
commit
92dcb3e01d
|
@ -58,7 +58,7 @@ then
|
||||||
#Look for config file and set ${MBR_DEVICE}.
|
#Look for config file and set ${MBR_DEVICE}.
|
||||||
if [ -f ${CONFIG_FILE} ]
|
if [ -f ${CONFIG_FILE} ]
|
||||||
then
|
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"
|
[ $? != 0 ] && die 9 "Error reading config file"
|
||||||
#If not found, create one and ask for ${MBR_DEVICE}
|
#If not found, create one and ask for ${MBR_DEVICE}
|
||||||
else
|
else
|
||||||
|
@ -82,6 +82,7 @@ then
|
||||||
else
|
else
|
||||||
die 7 "Error writing ${DIGEST_FILE}"
|
die 7 "Error writing ${DIGEST_FILE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Backup of good files
|
#Backup of good files
|
||||||
tar -czpPf ${BACKUP_FILE} ${MBR_TMP} /boot ${DIGEST_FILE}
|
tar -czpPf ${BACKUP_FILE} ${MBR_TMP} /boot ${DIGEST_FILE}
|
||||||
if [ $? == 0 ]
|
if [ $? == 0 ]
|
||||||
|
|
Loading…
Reference in New Issue