diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config index ecb6c35..9b50a45 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config @@ -86,7 +86,7 @@ networking_settings() { choice=$(dialog --no-collapse --cancel-label "Back" --title "Enable/disable Wi-Fi" --menu "Tip: Wi-Fi can also be toggled by short-pressing the BOOT button on the Luckfox." 13 50 5 \ 1 "Turn Wi-Fi on" \ 2 "Turn Wi-Fi off" \ - "" "" + "" "" \ 3 "Return to previous 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 diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-usb-config-tool.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-usb-config-tool.sh index 8341111..2b1ed1e 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-usb-config-tool.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-usb-config-tool.sh @@ -120,10 +120,12 @@ if [ -f "$mount_point/femtofox-config.txt" ]; then timezone) timezone=$(escape_sed "$value") ;; meshtastic_url) meshtastic_url=$(escape_sed "$value") ;; meshtastic_legacy_admin) meshtastic_legacy_admin=$(escape_sed "$value") ;; + meshtastic_public_key) meshtastic_public_key=$(escape_sed "$value") ;; + meshtastic_private_key) meshtastic_private_key=$(escape_sed "$value") ;; meshtastic_admin_key) meshtastic_admin_key=$(escape_sed "$value") ;; dont_run_if_log_exists) dont_run_if_log_exists=$(escape_sed "$value") ;; esac - done < <(grep -E '^(wifi_ssid|wifi_psk|wifi_country|meshtastic_lora_radio|timezone|meshtastic_url|meshtastic_legacy_admin|meshtastic_admin_key|dont_run_if_log_exists)=' "$usb_config") + done < <(grep -E '^(wifi_ssid|wifi_psk|wifi_country|meshtastic_lora_radio|timezone|meshtastic_url|meshtastic_legacy_admin|meshtastic_public_key|meshtastic_private_key|meshtastic_admin_key|dont_run_if_log_exists)=' "$usb_config") # Check if the log exits and if the dont_run_if_log_exists line is set in the script if $log_exists && [[ $dont_run_if_log_exists = "true" ]]; then @@ -222,7 +224,21 @@ if [ -f "$mount_point/femtofox-config.txt" ]; then log_message "Updating Meshtastic URL." found_config="true" fi - + + if [[ -n "$meshtastic_public_key" ]]; then + meshtastic_public_key="$(echo "$meshtastic_public_key" | sed 's/\\//g')" # remove weirdo windows characters + log_message "Updating Meshtastic public key." + found_config="true" + meshtastic_security_command+=" -U \"$meshtastic_public_key\"" # add to the command list + fi + + if [[ -n "$meshtastic_private_key" ]]; then + meshtastic_private_key="$(echo "$meshtastic_private_key" | sed 's/\\//g')" # remove weirdo windows characters + log_message "Updating Meshtastic private key." + found_config="true" + meshtastic_security_command+=" -R \"$meshtastic_private_key\"" # add to the command list + fi + if [[ -n "$meshtastic_admin_key" ]]; then meshtastic_admin_key=$(echo "$meshtastic_admin_key" | sed 's/\\//g') # remove weirdo windows characters if [ "$meshtastic_admin_key" = "clear" ]; then