Date: Wed, 22 Jan 2003 09:31:32 -0600 From: "Scot Hetzel" <hetzels@westbend.net> To: "Mike Makonnen" <mtm@identd.net> Cc: <FreeBSD-Current@FreeBSD.ORG> Subject: Re: Adduser difference between 5.0 and earlier versions Message-ID: <200301221540.h0MFe9Q5031431@WBIw009.westbend.net> References: <200301212250.h0LMoOXW029934@WBIw009.westbend.net> <20030122011847.OGBD21001.pop015.verizon.net@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
Here's the requested changes to make it re'ask the question on an invalid input. I left the code in for the default answer, but commented out. Scot Index: adduser.sh =================================================================== RCS file: /home/ncvs/src/usr.sbin/adduser/adduser.sh,v retrieving revision 1.3 diff -u -r1.3 adduser.sh --- adduser.sh 3 Dec 2002 05:41:09 -0000 1.3 +++ adduser.sh 22 Jan 2003 15:38:02 -0000 @@ -871,4 +871,22 @@ fi else input_interactive + while : ; do + echo -n "Add another user? (yes/no): " + read _input +# [ -z "$_input" ] && _input="No" + case $_input in + [Yy][Ee][Ss]|[Yy][Ee]|[Yy]) + input_interactive + continue + ;; + [Nn][Oo]|[Nn]) + echo "Goodbye!" + ;; + *) + continue + ;; + esac + break + done fi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200301221540.h0MFe9Q5031431>