mirror of https://schlomp.space/tastytea/hashboot
hmpf
commit
992465ad34
12
hashboot
12
hashboot
|
@ -77,13 +77,8 @@ then
|
||||||
#If not found, create one and ask for ${MBR_DEVICE}
|
#If not found, create one and ask for ${MBR_DEVICE}
|
||||||
else
|
else
|
||||||
#Create ${CONFIG_FILE} with defaults if noninterctive
|
#Create ${CONFIG_FILE} with defaults if noninterctive
|
||||||
if [ -z "$PS1" ]
|
if [ -t "0" ]
|
||||||
then
|
then
|
||||||
echo "#Device with the MBR on it" > ${CONFIG_FILE}
|
|
||||||
echo "MBR_DEVICE=${MBR_DEVICE}" >> ${CONFIG_FILE}
|
|
||||||
echo "#Where the Backup files are stored" >> ${CONFIG_FILE}
|
|
||||||
echo "BACKUP_FILE=${BACKUP_FILE}" >> ${CONFIG_FILE}
|
|
||||||
else
|
|
||||||
echo -n "Which device contains the MBR? [/dev/sda] "
|
echo -n "Which device contains the MBR? [/dev/sda] "
|
||||||
read -r MBR_DEVICE
|
read -r MBR_DEVICE
|
||||||
[ -z "${MBR_DEVICE}" ] && MBR_DEVICE="/dev/sda"
|
[ -z "${MBR_DEVICE}" ] && MBR_DEVICE="/dev/sda"
|
||||||
|
@ -95,6 +90,11 @@ else
|
||||||
[ -z "${BACKUP_FILE}" ] && BACKUP_FILE="/var/cache/boot-backup.tar.gz"
|
[ -z "${BACKUP_FILE}" ] && BACKUP_FILE="/var/cache/boot-backup.tar.gz"
|
||||||
echo "#Where the Backup files are stored" >> ${CONFIG_FILE}
|
echo "#Where the Backup files are stored" >> ${CONFIG_FILE}
|
||||||
echo "BACKUP_FILE=${BACKUP_FILE}" >> ${CONFIG_FILE}
|
echo "BACKUP_FILE=${BACKUP_FILE}" >> ${CONFIG_FILE}
|
||||||
|
else
|
||||||
|
echo "#Device with the MBR on it" > ${CONFIG_FILE}
|
||||||
|
echo "MBR_DEVICE=${MBR_DEVICE}" >> ${CONFIG_FILE}
|
||||||
|
echo "#Where the Backup files are stored" >> ${CONFIG_FILE}
|
||||||
|
echo "BACKUP_FILE=${BACKUP_FILE}" >> ${CONFIG_FILE}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue