diff --git a/package/gluon-setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode b/package/gluon-setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode index 314f8a43..83c0aa2d 100755 --- a/package/gluon-setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode +++ b/package/gluon-setup-mode/files/etc/hotplug.d/button/50-gluon-setup-mode @@ -6,9 +6,7 @@ wait=3 wait_setup_mode() { sleep $wait - uci set 'gluon-setup-mode.@setup_mode[0].enabled=1' - uci commit gluon-setup-mode - reboot + gluon-enter-setup-mode } diff --git a/package/gluon-setup-mode/files/usr/bin/gluon-enter-setup-mode b/package/gluon-setup-mode/files/usr/bin/gluon-enter-setup-mode new file mode 100755 index 00000000..e20f973d --- /dev/null +++ b/package/gluon-setup-mode/files/usr/bin/gluon-enter-setup-mode @@ -0,0 +1,8 @@ +#!/bin/sh + +set -euo pipefail + +echo "Entering setup mode and rebooting..." +uci set gluon-setup-mode.@setup_mode[0].enabled='1' +uci commit gluon-setup-mode +reboot