From 9d870ac83b48cb6187fdc784c2e18179f906759a Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 6 Dec 2019 18:01:58 -0600 Subject: Add debug to /etc/init.d/commission --- etc/init.d/commission | 9 +++++++-- 1 file 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: " -- cgit v1.2.3