diff options
author | 2003-01-24 00:24:26 +0000 | |
---|---|---|
committer | 2003-01-24 00:24:26 +0000 | |
commit | ada7115bf126f7c17d8f604ee662147e409036be (patch) | |
tree | 1600b8be3727ecd50453ff78988a0c5f6ae0f70d /adduser/adduser.sh | |
parent | bd780ba6bb365b7f43c1e565746aef2b5051f0a2 (diff) | |
download | pw-darwin-ada7115bf126f7c17d8f604ee662147e409036be.tar.gz pw-darwin-ada7115bf126f7c17d8f604ee662147e409036be.tar.zst pw-darwin-ada7115bf126f7c17d8f604ee662147e409036be.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 |