aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Makonnen <mtm@FreeBSD.org>2003-01-24 00:24:26 +0000
committerMike Makonnen <mtm@FreeBSD.org>2003-01-24 00:24:26 +0000
commit21084fe3e459e44108f2469e5dc9992ac9d8f535 (patch)
tree739ccd759050e4bba48302e06cd11072fe9eb237
parentbbef019c84fbe51813674be7a28ddffd8ea000db (diff)
downloadsrc-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
-rw-r--r--usr.sbin/adduser/adduser.sh18
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