summaryrefslogtreecommitdiffstats
path: root/usr.sbin/adduser
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2003-01-24 00:24:26 +0000
committermtm <mtm@FreeBSD.org>2003-01-24 00:24:26 +0000
commit64dae1c0936e4013f1ed70b3468d335b8b7283a0 (patch)
tree739ccd759050e4bba48302e06cd11072fe9eb237 /usr.sbin/adduser
parent7d4d4fab25d5bd413eef65b8ac867699aae7d3b7 (diff)
downloadFreeBSD-src-64dae1c0936e4013f1ed70b3468d335b8b7283a0.zip
FreeBSD-src-64dae1c0936e4013f1ed70b3468d335b8b7283a0.tar.gz
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 'usr.sbin/adduser')
-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 6c14251..9db60e8 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
OpenPOWER on IntegriCloud