o initialize a couple of local flags so the user can re-edit groups

next time the subroutine is re-entered
o s/configrun/configflag/
o Make the prompt make sense if the user was creating a configuration file

Approved by:	markm (mentor)(implicit)
This commit is contained in:
Mike Makonnen 2003-03-19 08:07:15 +00:00
parent 58089a20d1
commit 187a97aab9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112401

View File

@ -558,6 +558,8 @@ input_interactive() {
_random="no" _random="no"
_emptypass="no" _emptypass="no"
_usepass="yes" _usepass="yes"
_logingroup_ok="no"
_groups_ok="no"
case $passwdtype in case $passwdtype in
none) none)
_emptypass="yes" _emptypass="yes"
@ -629,7 +631,7 @@ input_interactive() {
;; ;;
esac esac
passwdtype="yes" passwdtype="yes"
[ -n "$configrun" ] && break [ -n "$configflag" ] && break
trap 'stty echo; exit' 0 1 2 3 15 trap 'stty echo; exit' 0 1 2 3 15
stty -echo stty -echo
echo -n "Enter password: " echo -n "Enter password: "
@ -904,7 +906,11 @@ if [ -n "$fflag" ]; then
else else
input_interactive input_interactive
while : ; do while : ; do
echo -n "Add another user? (yes/no): " if [ -z "$configflag" ]; then
echo -n "Add another user? (yes/no): "
else
echo -n "Re-edit the default configuration? (yes/no): "
fi
read _input read _input
case $_input in case $_input in
[Yy][Ee][Ss]|[Yy][Ee]|[Yy]) [Yy][Ee][Ss]|[Yy][Ee]|[Yy])