diff options
author | John Klug <john.klug@multitech.com> | 2019-12-02 19:32:52 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2019-12-02 19:32:52 -0600 |
commit | 5be1b34a2beb91667e24bdbf8980bc419add92b8 (patch) | |
tree | e18a81bd29ac6a6e6597f7ba2ad1a9af9f4e114e | |
parent | 64135961b72c93d7b646f3a2a6d5d45d7dfeb9e9 (diff) | |
download | commissioning-5be1b34a2beb91667e24bdbf8980bc419add92b8.tar.gz commissioning-5be1b34a2beb91667e24bdbf8980bc419add92b8.tar.bz2 commissioning-5be1b34a2beb91667e24bdbf8980bc419add92b8.zip |
Fix the no-commissioning case.
-rwxr-xr-x | etc/init.d/commissioning | 12 | ||||
-rwxr-xr-x | etc/init.d/php-fpm-commission | 11 |
2 files changed, 9 insertions, 14 deletions
diff --git a/etc/init.d/commissioning b/etc/init.d/commissioning index c04a51a..4fc7366 100755 --- a/etc/init.d/commissioning +++ b/etc/init.d/commissioning @@ -21,13 +21,11 @@ if [[ ENABLED == no ]] ; then fi fi -# /etc/default/no-${NAME} should point at /etc/default/.no-${NAME} -# and contain ENABLED="no". -# This will prevent commissioning on a factory reset -# but not on an image update for tighter security. -# If the device is to have no password at all, this file and -# link must be created, and ENABLED must be set to "no" -[ -f "/etc/default/no-${NAME}" ] && . "/etc/config/no-${NAME}" +# To disable commissioning across a factory reset (and image install): +# echo 'ENABLED="no"' >/var/config/.no-commissioning +# ln -sf /var/config/.no-commissioning /etc/default/no-commissioning + +[ -f "/etc/default/no-${NAME}" ] && . "/etc/default/no-${NAME}" case "$1" in diff --git a/etc/init.d/php-fpm-commission b/etc/init.d/php-fpm-commission index d61584c..7ac0925 100755 --- a/etc/init.d/php-fpm-commission +++ b/etc/init.d/php-fpm-commission @@ -24,13 +24,10 @@ ENABLED=yes [ -f "/etc/default/commissioning" ] && . "/etc/config/commisioning" -# /etc/default/no-${NAME} should point at /etc/default/.no-${NAME} -# and contain ENABLED="no". -# This will prevent commissioning on a factory reset -# but not on an image update for tighter security. -# If the device is to have no password at all, this file and -# link must be created, and ENABLED must be set to "no" -[ -f "/etc/default/no-${NAME}" ] && . "/etc/config/no-${NAME}" +# To disable commissioning across a factory reset (and image install): +# echo 'ENABLED="no"' >/var/config/.no-commissioning +# ln -sf /var/config/.no-commissioning /etc/default/no-commissioning +[ -f "/etc/default/no-commissioning" ] && . "/etc/default/no-commissioning" wait_for_pid () { try=0 |