diff options
author | John Klug <john.klug@multitech.com> | 2019-12-06 18:01:58 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2019-12-06 18:01:58 -0600 |
commit | 9d870ac83b48cb6187fdc784c2e18179f906759a (patch) | |
tree | 18e9e2c227d9557d3d8eeff93f5eb3745476fbac | |
parent | 7f68a2cd981cc9d6a8a2b0a345765d3f22197110 (diff) | |
download | commissioning-9d870ac83b48cb6187fdc784c2e18179f906759a.tar.gz commissioning-9d870ac83b48cb6187fdc784c2e18179f906759a.tar.bz2 commissioning-9d870ac83b48cb6187fdc784c2e18179f906759a.zip |
Add debug to /etc/init.d/commission
-rwxr-xr-x | etc/init.d/commission | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/etc/init.d/commission b/etc/init.d/commission index 7b1b7aa..5241176 100755 --- a/etc/init.d/commission +++ b/etc/init.d/commission @@ -11,6 +11,8 @@ CONF_DIR=/var/config ENABLED=yes PASSWORDS=$(passwd -Sa | egrep '^[^[:space:]]+[[:space:]]P[[:space:]]' | wc -l) + +[ -f "/etc/default/rcS" ] && . "/etc/default/rcS" if (($PASSWORDS == 0)) ; then # No password, so indicate commissioning mode # php-fpm-commision will be turned on as well @@ -33,8 +35,11 @@ fi case "$1" in start) if [ "$ENABLED" != "yes" ]; then - echo "$NAME: disabled:" - echo "$PASSWORDS" + echo "Some user has a password" + if [ "$VERBOSE" = very ] ; then + passwd -Sa | egrep '^[^[:space:]]+[[:space:]]P[[:space:]]' | logger -s -p daemon.notice + echo "user count with passwords: $PASSWORDS" + fi exit fi echo -n "Starting $DESC: " |