Set usb drive within interactive installer

This commit is contained in:
Bob Mottram 2015-03-22 17:17:33 +00:00
parent d0dbebbdeb
commit 8f76da21b8
1 changed files with 8 additions and 0 deletions

View File

@ -82,6 +82,7 @@ MICROBLOG_DOMAIN_NAME=
MICROBLOG_CODE=
GIT_DOMAIN_NAME=
GIT_CODE=
USB_DRIVE=/dev/sdb1
CONFIGURATION_FILE=
@ -149,6 +150,7 @@ function save_configuration_file {
fi
echo "SYSTEM_TYPE=$SYSTEM_TYPE" >> $CONFIGURATION_FILE
echo "INSTALLING_ON_BBB=$INSTALLING_ON_BBB" >> $CONFIGURATION_FILE
echo "USB_DRIVE=$USB_DRIVE" >> $CONFIGURATION_FILE
echo "DDNS_PROVIDER=$DDNS_PROVIDER" >> $CONFIGURATION_FILE
echo "DDNS_USERNAME=$DDNS_USERNAME" >> $CONFIGURATION_FILE
echo "DDNS_PASSWORD=$DDNS_PASSWORD" >> $CONFIGURATION_FILE
@ -306,6 +308,9 @@ function interactive_configuration {
1) INSTALLING_ON_BBB="no";;
255) exit 0;;
esac
if [[ $INSTALLING_ON_BBB == "yes" ]]; then
USB_DRIVE=/dev/sdb1
fi
save_configuration_file
data=$(tempfile 2>/dev/null)
@ -1085,6 +1090,9 @@ function read_configuration {
if grep -q "INSTALLING_ON_BBB" $CONFIGURATION_FILE; then
INSTALLING_ON_BBB=$(grep "INSTALLING_ON_BBB" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "USB_DRIVE" $CONFIGURATION_FILE; then
USB_DRIVE=$(grep "USB_DRIVE" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi
if grep -q "PUBLIC_MAILING_LIST" $CONFIGURATION_FILE; then
PUBLIC_MAILING_LIST=$(grep "PUBLIC_MAILING_LIST" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
fi