mirror of
https://github.com/femtofox/femtofox.git
synced 2026-10-26 19:02:00 -04:00
Add "run usb config tool" and "reboot" to utilities menu
This commit is contained in:
parent
0fffb11f40
commit
201f32d69b
1 changed files with 23 additions and 15 deletions
|
|
@ -122,7 +122,7 @@ networking_settings() {
|
|||
fi
|
||||
;;
|
||||
7) # Test internet connection)
|
||||
dialog --infobox "Testing internet connection..." 0 0
|
||||
dialog --infobox "Testing internet connection..." 5 45
|
||||
dialog --title "Internet connectivity test" --colors --msgbox "$(replace_colors "$(femto-network-config.sh -t)")" 8 40
|
||||
;;
|
||||
8)
|
||||
|
|
@ -169,9 +169,11 @@ utilities() {
|
|||
1 "Set system timezone" \
|
||||
2 "Kernel modules" \
|
||||
3 "Re-run first-boot script" \
|
||||
4 "Run OEM luckfox-config" \
|
||||
4 "Run USB configuration tool" \
|
||||
5 "Run OEM luckfox-config" \
|
||||
6 "Reboot" \
|
||||
"" "" \
|
||||
5 "Back to Main Menu" 3>&1 1>&2 2>&3)
|
||||
7 "Back to Main Menu" 3>&1 1>&2 2>&3)
|
||||
|
||||
exit_status=$? # This line checks the exit status of the dialog command
|
||||
if [ $exit_status -ne 0 ]; then # Exit the loop if the user selects "Cancel" or closes the dialog
|
||||
|
|
@ -179,22 +181,28 @@ utilities() {
|
|||
fi
|
||||
|
||||
case $option in
|
||||
1) # set timezone)
|
||||
femto-set-timezone.sh
|
||||
;;
|
||||
2) # the contents of this should probably moved to a script)
|
||||
1) femto-set-timezone.sh ;; # set timezone)
|
||||
2) # Kernel modules)
|
||||
dialog --title "$title" --msgbox "Kernel modules are loadable pieces of code that extend a Linux kernel's functionality without requiring a reboot. Common examples include device drivers, file systems, or system calls.\n\nThis tool will allow you to add pre-compiled modules to the Foxbuntu kernel.\n\nModules currently autostarting at boot:\n$(sed -n '6,$p' /etc/modules | sed ':a;N;$!ba;s/\n/, /g;s/, $//')" 16 65
|
||||
femto-kernel-modules.sh
|
||||
;;
|
||||
3)
|
||||
femto-runonce.sh
|
||||
3) femto-runonce.sh ;; # Re-run first-boot script)
|
||||
4) # USB config)
|
||||
dialog --title "$title" --yesno "The USB configuration tool allows you to set critical Femtofox settings with a text file on a USB flash drive.\n\nFor more information, visit\ngithub.com/noon92/femtofox/blob/main/usb_config.md\n\nThis tool is run automatically at boot.\n\nRun now?" 14 60
|
||||
if [ $? -eq 0 ]; then #unless cancel/no
|
||||
femto-usb-config-tool.sh
|
||||
pause
|
||||
fi
|
||||
;;
|
||||
4)
|
||||
luckfox-config
|
||||
;;
|
||||
5)
|
||||
return
|
||||
5) luckfox-config ;;
|
||||
6)
|
||||
dialog --title "$title" --yesno "Reboot now?" 6 45
|
||||
if [ $? -eq 0 ]; then #unless cancel/no
|
||||
dialog --infobox "Rebooting..." 5 45
|
||||
reboot
|
||||
fi
|
||||
;;
|
||||
7) return ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
|
@ -327,7 +335,7 @@ meshtasticd_settings() {
|
|||
set_lora_radio
|
||||
;;
|
||||
5)
|
||||
dialog --infobox "Getting admin keys..." 0 0
|
||||
dialog --infobox "Getting admin keys..." 5 45
|
||||
dialog --title "Admin keys" --msgbox "Up to 3 admin keys are permitted, more will be ignored.\n\nKeys:$(femto-meshtasticd-config.sh -v | tail -n 1 | sed 's/|n/\\n/g')" 0 0
|
||||
;;
|
||||
6) #set admin key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue