mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
add defaults for adduser.sh (OK? [yes] & additional user [no])
Event: Kitchener-Waterloo Hackathon 202305 Differential Revision: https://reviews.freebsd.org/D40157
This commit is contained in:
parent
3bfbb521fe
commit
9efad6f9e1
|
@ -657,6 +657,8 @@ input_interactive() {
|
||||||
_usepass="yes"
|
_usepass="yes"
|
||||||
_logingroup_ok="no"
|
_logingroup_ok="no"
|
||||||
_groups_ok="no"
|
_groups_ok="no"
|
||||||
|
_all_ok="yes"
|
||||||
|
_another_user="no"
|
||||||
case $passwdtype in
|
case $passwdtype in
|
||||||
none)
|
none)
|
||||||
_emptypass="yes"
|
_emptypass="yes"
|
||||||
|
@ -817,8 +819,11 @@ input_interactive() {
|
||||||
printf "%-10s : %s\n" "Shell" "$ushell"
|
printf "%-10s : %s\n" "Shell" "$ushell"
|
||||||
printf "%-10s : %s\n" "Locked" "$_disable"
|
printf "%-10s : %s\n" "Locked" "$_disable"
|
||||||
while : ; do
|
while : ; do
|
||||||
echo -n "OK? (yes/no): "
|
echo -n "OK? (yes/no) [$_all_ok]: "
|
||||||
read _input
|
read _input
|
||||||
|
if [ -z "$_input" ]; then
|
||||||
|
_input=$_all_ok
|
||||||
|
fi
|
||||||
case $_input in
|
case $_input in
|
||||||
[Nn][Oo]|[Nn])
|
[Nn][Oo]|[Nn])
|
||||||
return 1
|
return 1
|
||||||
|
@ -1030,11 +1035,14 @@ else
|
||||||
input_interactive
|
input_interactive
|
||||||
while : ; do
|
while : ; do
|
||||||
if [ -z "$configflag" ]; then
|
if [ -z "$configflag" ]; then
|
||||||
echo -n "Add another user? (yes/no): "
|
echo -n "Add another user? (yes/no) [$_another_user]: "
|
||||||
else
|
else
|
||||||
echo -n "Re-edit the default configuration? (yes/no): "
|
echo -n "Re-edit the default configuration? (yes/no) [$_another_user]: "
|
||||||
fi
|
fi
|
||||||
read _input
|
read _input
|
||||||
|
if [ -z "$_input" ]; then
|
||||||
|
_input=$_another_user
|
||||||
|
fi
|
||||||
case $_input in
|
case $_input in
|
||||||
[Yy][Ee][Ss]|[Yy][Ee]|[Yy])
|
[Yy][Ee][Ss]|[Yy][Ee]|[Yy])
|
||||||
uidstart=`get_nextuid $uidstart`
|
uidstart=`get_nextuid $uidstart`
|
||||||
|
|
Loading…
Reference in a new issue