From b96703f46f847833d49e38a0cb553bdccd2bf7e7 Mon Sep 17 00:00:00 2001 From: Mike Makonnen Date: Fri, 24 Jan 2003 00:24:26 +0000 Subject: 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 Approved by: markm (mentor) --- adduser/adduser.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'adduser/adduser.sh') 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 -- cgit v1.2.3-56-ge451