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 | b96703f46f847833d49e38a0cb553bdccd2bf7e7 (patch) | |
tree | 2b2d0d6afdecb2de297018b3164f2898edb198e8 /adduser/adduser.sh | |
parent | 83d409bcd77b3f2169afc8961b6e02d98769c845 (diff) | |
download | pw-darwin-b96703f46f847833d49e38a0cb553bdccd2bf7e7.tar.gz pw-darwin-b96703f46f847833d49e38a0cb553bdccd2bf7e7.tar.zst pw-darwin-b96703f46f847833d49e38a0cb553bdccd2bf7e7.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)
Diffstat (limited to 'adduser/adduser.sh')
-rw-r--r-- | adduser/adduser.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/adduser/adduser.sh b/adduser/adduser.sh index 6c14251..9db60e8 100644 --- a/adduser/adduser.sh +++ b/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 |