summaryrefslogtreecommitdiff
path: root/adduser.local
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2006-08-25 04:39:27 +0000
committerJonas Smedegaard <dr@jones.dk>2006-08-25 04:39:27 +0000
commit4026d0de679b0ebf6f6f39e5ece02d0d83f9a362 (patch)
tree1fadd913918615693a4d260ddb11a48cb8ba4a01 /adduser.local
parentbbe80a51abda5922a4ab512ebae43c098a95a837 (diff)
Check for VERBOSE existing before assuming it is numerical (needed for sarge).
Diffstat (limited to 'adduser.local')
-rwxr-xr-xadduser.local14
1 files changed, 7 insertions, 7 deletions
diff --git a/adduser.local b/adduser.local
index 8ee0914..49aa47b 100755
--- a/adduser.local
+++ b/adduser.local
@@ -3,7 +3,7 @@
# /usr/local/sbin/adduser.local
# Copyright 2001-2006 Jonas Smedegaard <dr@jones.dk>
#
-# $Id: adduser.local,v 1.25 2006-08-25 02:29:51 jonas Exp $
+# $Id: adduser.local,v 1.26 2006-08-25 04:39:27 jonas Exp $
#
# Adduser additions for Redpill networks
#
@@ -35,7 +35,7 @@ add2list() { /bin/echo "$1" | /usr/sbin/add_members -w y -a y -r - "$2"; }
# Samba password
#FIXME: Check if enabled in samba.conf (or included files!)
-if [ "$VERBOSE" -gt 0 ] && ([ -x /usr/bin/pdbedit ] || [ -x /usr/bin/smbpasswd ]); then
+if [ -n "$VERBOSE" ] && [ "$VERBOSE" -gt 0 ] && ([ -x /usr/bin/pdbedit ] || [ -x /usr/bin/smbpasswd ]); then
echo -n "Add samba access to the account (y/N)? "
read sambaaccount
case $sambaaccount in
@@ -50,7 +50,7 @@ if [ "$VERBOSE" -gt 0 ] && ([ -x /usr/bin/pdbedit ] || [ -x /usr/bin/smbpasswd ]
fi
# Mail forwarding
-if [ "$VERBOSE" -gt 0 ] && [ -x /usr/local/sbin/userforward ]; then
+if [ -n "$VERBOSE" ] && [ "$VERBOSE" -gt 0 ] && [ -x /usr/local/sbin/userforward ]; then
echo -n "Forward mail to an external account (y/N)? "
read mailforward
case $mailforward in
@@ -71,7 +71,7 @@ fi
# Mailing lists
maildomain="`maildomain`"
-if [ "$VERBOSE" -gt 0 ] && [ -n "$maildomain" ]; then
+if [ -n "$VERBOSE" ] && [ "$VERBOSE" -gt 0 ] && [ -n "$maildomain" ]; then
echo -n "Subscribe $NEWUSERNAME@$maildomain to mailinglists (y/N)? "
read subscribe
case $subscribe in
@@ -103,7 +103,7 @@ if [ -f /etc/local/users.conf ]; then
addgroup $NEWUSERNAME $USERS_GROUPNAME
fi
- if [ "$VERBOSE" -gt 0 ] && [ -n "$REALUSERS_GROUPNAME" ]; then
+ if [ -n "$VERBOSE" ] && [ "$VERBOSE" -gt 0 ] && [ -n "$REALUSERS_GROUPNAME" ]; then
echo "This system has both dummy and real users:"
echo " Dummy users have read access to specific files."
echo " Real users have read/write access to personal files."
@@ -119,13 +119,13 @@ if [ -f /etc/local/users.conf ]; then
fi
fi
-#if [ "$VERBOSE" -gt 0 ] && [ -n "$REALUSERS_GROUPNAME" ]; then
+#if [ -n "$VERBOSE" ] && [ "$VERBOSE" -gt 0 ] && [ -n "$REALUSERS_GROUPNAME" ]; then
# cat <<+
#Is this a remote or local user (with need for physical
#access to devices like CD-ROM, soundcard and modem needed)?
#
#+
-if [ "$VERBOSE" -gt 0 ]; then
+if [ -n "$VERBOSE" ] && [ "$VERBOSE" -gt 0 ]; then
echo -n "Grant this user access to local utilities (y/N)?"
read localuser
case $localuser in