#!/bin/ash
-set -x
. ${SCRIPT_DIR}/functions
rm -f ${SSH_CONF}
if answerfile_specifies "enable-ssh" ; then
+ not_previous $@ || exit ${Previous}
SSH_ENABLED=$(read_xml_tag "${ANSWERFILE}" "enable-ssh")
+
elif ! interactive ; then
SSH_ENABLED=false
+
else
dialog --yes-label "Yes" --no-label "No" --yesno "\n Do you wish to enable the SSH server?" 7 50
if [ "${OPT}" = 0 ] ; then
SSH_ENABLED=true
else
- SSH_ENABLED=false
+ SSH_ENABLED=false
fi
fi
}
if answerfile_specifies "mode" ; then
+ not_previous $@ || exit ${Previous}
+
MODE=$(read_xml_tag "${ANSWERFILE}" "mode")
case "${MODE}" in
. ${SCRIPT_DIR}/functions
# ^^^ defines ${PASSWORD_CONF}
-
if answerfile_specifies "password" ; then
+ not_previous $@ || exit ${Previous}
+
PASSWORD=$(read_xml_tag "${ANSWERFILE}" "password")
# Do not validate. Empty is acceptable.
Check-initrd-data, Continue:Set-password | CheckFail:Bad-install-choice | Abort:Fail
Set-password, Continue:Enable-SSH | Abort:Fail
-Enable-SSH, Continue:Find-existing-install
+Enable-SSH, Continue:Find-existing-install
Bad-install-choice, Retry:Choose-install-type | Abort:Fail