From 3638de5a4beee7152330dd59fffe1300f769b477 Mon Sep 17 00:00:00 2001 From: dzzinstant Date: Tue, 13 Oct 2020 15:25:53 +0200 Subject: [PATCH] Don't use the power button to enter gluon setup mode. Using the power button for setup mode would work for the AVM 3370, but may side effects on other devices. On devices with a dedicated controller for power management, 'power pressed' and 'power released' events might be consumed by the controller, or emitted at unexpected times. This might lead to shutdowns failing, the device randomly put into setup mode, or similar things. Support for an outdated, non-mainstream device such as the AVM 3370 shouldn't invite such extra problems. Moreover, the feature in question can also be added after the installation, simply by editing `/etc/hotplug.d/button/50-gluon-setup-mode` and changing one line: ` -if [ "$BUTTON" = wps ] || [ "$BUTTON" = reset ] || [ "$BUTTON" = phone ]; then +if [ "$BUTTON" = wps ] || [ "$BUTTON" = reset ] || [ "$BUTTON" = phone ] || [ "$BUTTON" = power ]; then ` --- .../files/etc/hotplug.d/button/50-gluon-setup-mode | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 df596ad8..314f8a43 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 @@ -12,8 +12,7 @@ wait_setup_mode() { } -if [ "$BUTTON" = wps ] || [ "$BUTTON" = reset ] || - [ "$BUTTON" = phone ] || [ "$BUTTON" = power ]; then +if [ "$BUTTON" = wps ] || [ "$BUTTON" = reset ] || [ "$BUTTON" = phone ]; then case "$ACTION" in pressed) wait_setup_mode &