# Show disclaimer where you need to press SPACE to continue. To make sure warning is read.
#
exec 3>&1
ACKNOWLEDGEMENT=$(dialog --nocancel--backtitle"$BACKTITLE"--no-collapse--title"Warning"--clear--radiolist"\nThis configuration tool runs under superuser rights.\n\n" 10 56 7 "Yes, I understand the risks""" off 2>&1 1>&3)
"Exit"--ok-label"Save"--checklist"\nChoose what you want to enable or disable:\n "$LISTLENGHT 70 15 "${MOTD[@]}" 2>&1 1>&3)
"Exit"--ok-label"Save"--checklist"\nChoose what you want to enable or disable:\n "\
$LISTLENGHT 70 15 "${MOTD[@]}" 2>&1 1>&3)
exit_status=$?
exec 3>&-
case$exit_statusin
...
...
@@ -261,74 +314,110 @@ DIALOG_ESC=255
done
;;
# Set the display resolution
#
"Display")
h3disp
exit
;;
# Enable or disable desktop
#
"Desktop")
if[[-f /usr/sbin/nodm &&-n$(service nodm status | grep-w active | grep-w running)]];then
dialog --title"Desktop is enabled and running"--backtitle"$BACKTITLE"--yes-label"Stop"--no-label"Cancel"--yesno"\nDo you want to stop and disable this service?" 7 50
dialog --title"Desktop is enabled and running"--backtitle"$BACKTITLE"\
--yes-label"Stop"--no-label"Cancel"--yesno"\nDo you want to stop and disable this service?" 7 50
exitstatus=$?;
[[$exitstatus= 0 ]]&& service nodm stop &&sed-i"s/^NODM_ENABLED=.*/NODM_ENABLED=false/" /etc/default/nodm
else
dialog --title"Desktop is disabled"--backtitle"$BACKTITLE"--yes-label"Start"--no-label"Cancel"--yesno"\nDo you want to enable and start this service?" 7 50
dialog --title"Desktop is disabled"--backtitle"$BACKTITLE"--yes-label"Start"\
--no-label"Cancel"--yesno"\nDo you want to enable and start this service?" 7 50
exitstatus=$?;
[[$exitstatus= 0 ]]&&sed-i"s/^NODM_ENABLED=.*/NODM_ENABLED=true/" /etc/default/nodm && service nodm start
dialog --title"Root overlay"--backtitle"$BACKTITLE"--yes-label"Disable"--no-label"Cancel"--yesno"\nYour system is already virtual read-only.\n\nDo you want to disable this feature and reboot?" 9 60
if[[-n$(service hostapd status | grep-w active | grep-w running)]];then
dialog --title"Hostapd service is running"--backtitle"$BACKTITLE"--help-button--help-label"Cancel"--yes-label"Stop"--no-label"Edit"--yesno"\nStop: stop and disable\n\nEdit: change basic parameters: SSID, password and channel" 9 70
dialog --title"Hostapd service is running"--backtitle"$BACKTITLE"--help-button--help-label"Cancel"--yes-label"Stop"\
--no-label"Edit"--yesno"\nStop: stop and disable\n\nEdit: change basic parameters: SSID, password and channel" 9 70
exitstatus=$?;
if[[$exitstatus= 0 ]];then service hostapd stop ;sed-i"s/^DAEMON_CONF=.*/DAEMON_CONF=/" /etc/init.d/hostapd;fi
if[[$exitstatus= 0 ]];then service hostapd stop ;sed-i"s/^DAEMON_CONF=.*/DAEMON_CONF=/" /etc/init.d/hostapd;\
systemctl daemon-reload;fi
if[[$exitstatus= 1 ]];then wlan_edit; service hostapd stop;sleep 1; service hostapd start;fi
dialog --title"Choose Access Point mode for $WIRELESS_ADAPTER"--backtitle"$BACKTITLE"--help-button--help-label"Manual"--yes-label"Bridge"--no-label"NAT"--yesno"\nBridge: wireless clients will use your routers DHCP server\n\nNAT: with own DHCP server, out of your primary network\n\nManual: edit configuration manually" 11 70
dialog --title"Choose Access Point mode for $WIRELESS_ADAPTER"--backtitle"$BACKTITLE"--help-button\
--help-label"Manual"--yes-label"Bridge"--no-label"NAT"--yesno"\nBridge: wireless clients will use your routers DHCP \
server\n\nNAT: with own DHCP server, out of your primary network\n\nManual: edit configuration manually" 11 70
response=$?
DEFAULT_ADAPTER=$(ip -4 route ls | grep default | grep-Po'(?<=dev )(\S+)')
dialog --title"Warning"--backtitle"$BACKTITLE"--yes-label"OK"--no-label"Cancel"--yesno"\nYou are switching to automated daily build which is untested and might break your system. Are you fine with that?" 9 44
dialog --title"Install and reboot"--backtitle"$BACKTITLE"--yes-label"OK"--no-label"Cancel"--yesno"\nSwitching to linux-image${TARGET_BRANCH}-${TARGET_FAMILY}\n\nMake sure you know what you are doing! \n\nBoard config will be reverted to defaults." 11 46
dialog --title"Install and reboot"--backtitle"$BACKTITLE"--yes-label"OK"--no-label"Cancel"\
--yesno"\nSwitching to linux-image${TARGET_BRANCH}-${TARGET_FAMILY}\n\nMake sure you know what you are doing! \
\n\nBoard config will be reverted to defaults." 11 46
if[[$?= 0 ]];then
# remove old
dialog --backtitle"$BACKTITLE"--title"Please wait"--infobox"\nRemoving current kernel." 5 28