diff options
author | Mike Makonnen <mtm@FreeBSD.org> | 2003-01-24 00:24:26 +0000 |
---|---|---|
committer | Mike Makonnen <mtm@FreeBSD.org> | 2003-01-24 00:24:26 +0000 |
commit | 21084fe3e459e44108f2469e5dc9992ac9d8f535 (patch) | |
tree | 739ccd759050e4bba48302e06cd11072fe9eb237 /usr.sbin/adduser/adduser.sh | |
parent | bbef019c84fbe51813674be7a28ddffd8ea000db (diff) | |
download | src-21084fe3e459e44108f2469e5dc9992ac9d8f535.tar.gz src-21084fe3e459e44108f2469e5dc9992ac9d8f535.zip |
In interactive mode, ask the user if he/she wants to add another
user and re-run interactive questions or quit depending on the
answer.
Submitted by: Scot Hetzel <hetzels@westbend.net>
Approved by: markm (mentor)
Notes
Notes:
svn path=/head/; revision=109768
Diffstat (limited to 'usr.sbin/adduser/adduser.sh')
-rw-r--r-- | usr.sbin/adduser/adduser.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/usr.sbin/adduser/adduser.sh b/usr.sbin/adduser/adduser.sh index 6c142513b1d2..9db60e80f2a7 100644 --- a/usr.sbin/adduser/adduser.sh +++ b/usr.sbin/adduser/adduser.sh @@ -881,4 +881,22 @@ if [ -n "$fflag" ]; then fi else input_interactive + while : ; do + echo -n "Add another user? (yes/no): " + read _input + case $_input in + [Yy][Ee][Ss]|[Yy][Ee]|[Yy]) + uidstart=`get_nextuid $uidstart` + input_interactive + continue + ;; + [Nn][Oo]|[Nn]) + echo "Goodbye!" + ;; + *) + continue + ;; + esac + break + done fi |