*** src/bin/scripts/createuser.old Sun Sep 23 15:30:00 2001 --- src/bin/scripts/createuser Sun Sep 23 15:33:16 2001 *************** *** 39,45 **** fi ! while [ $# -gt 0 ] do case "$1" in --help|-\?) --- 39,45 ---- fi ! while [ "$#" -gt 0 ] do case "$1" in --help|-\?) *************** *** 174,180 **** if [ -z "$NewUser" ]; then $ECHO_N "Enter name of user to add: "$ECHO_C read NewUser ! [ $? -ne 0 ] && exit 1 fi if [ "$PwPrompt" ]; then --- 174,180 ---- if [ -z "$NewUser" ]; then $ECHO_N "Enter name of user to add: "$ECHO_C read NewUser ! [ "$?" -ne 0 ] && exit 1 fi if [ "$PwPrompt" ]; then *************** *** 198,204 **** if [ -z "$CanCreateDb" ]; then $ECHO_N "Shall the new user be allowed to create databases? (y/n) "$ECHO_C read REPLY ! [ $? -ne 0 ] && exit 1 if [ "$REPLY" = "y" -o "$REPLY" = "Y" ]; then CanCreateDb=t else --- 198,204 ---- if [ -z "$CanCreateDb" ]; then $ECHO_N "Shall the new user be allowed to create databases? (y/n) "$ECHO_C read REPLY ! [ "$?" -ne 0 ] && exit 1 if [ "$REPLY" = "y" -o "$REPLY" = "Y" ]; then CanCreateDb=t else *************** *** 209,215 **** if [ -z "$CanAddUser" ]; then $ECHO_N "Shall the new user be allowed to create more new users? (y/n) "$ECHO_C read REPLY ! [ $? -ne 0 ] && exit 1 if [ "$REPLY" = "y" -o "$REPLY" = "Y" ]; then CanAddUser=t else --- 209,215 ---- if [ -z "$CanAddUser" ]; then $ECHO_N "Shall the new user be allowed to create more new users? (y/n) "$ECHO_C read REPLY ! [ "$?" -ne 0 ] && exit 1 if [ "$REPLY" = "y" -o "$REPLY" = "Y" ]; then CanAddUser=t else *************** *** 239,245 **** [ "$CanAddUser" = f ] && QUERY="$QUERY NOCREATEUSER" ${PATHNAME}psql -c "$QUERY" -d template1 $PSQLOPT ! if [ $? -ne 0 ]; then echo "$CMDNAME: creation of user \"$NewUser\" failed" 1>&2 exit 1 fi --- 239,245 ---- [ "$CanAddUser" = f ] && QUERY="$QUERY NOCREATEUSER" ${PATHNAME}psql -c "$QUERY" -d template1 $PSQLOPT ! if [ "$?" -ne 0 ]; then echo "$CMDNAME: creation of user \"$NewUser\" failed" 1>&2 exit 1 fi