source /root/instantARCH/askutils.sh
-if [ -e /usr/share/liveutils ]; then
+if [ -e /usr/share/liveutils ] && ! [ -e /tmp/nogui ]; then
echo "GUI Mode active"
export GUIMODE="True"
GUIMODE="True"
# switch imenu to fzf and dialog
if ! guimode; then
touch /tmp/climenu
+ imenu -m "Welcome to the instantOS installer"
+else
+ NEXTCHOICE="$(echo '>>h Welcome to the instantOS installer
+:g Next
+:r ﰸCancel' | instantmenu -q 'select using the mouse, keywords and arrow keys' -i -l 209 -h -1 -bw 8 -a 60 -w -1 -c)"
+
+ if grep -iq 'cancel' <<<"$NEXTCHOICE"; then
+ echo "canceling installation"
+ mkdir /opt/instantos
+ touch /opt/instantos/installcanceled
+ touch /opt/instantos/statuscanceled
+ exit 1
+ fi
fi
-imenu -m "Welcome to the instantOS installer"
-
# go back to the beginning if user isn't happy with settings
# this loop wraps the rest of the installer
while ! iroot confirm; do
iroot hostname "$NEWHOSTNAME"
+ if imenu -c -i "edit advanced settings? (use only if you know what you're doing)"; then
+ /root/instantARCH/askadvanced.sh
+ fi
+
wallstatus install
SUMMARY="Installation Summary:"
SUMMARY="$SUMMARY
Should installation proceed with these parameters?"
+ echo "summary:
+$SUMMARY"
+
if imenu -C <<<"$SUMMARY"; then
iroot confirm 1
else