X-Git-Url: https://git.cameronkatri.com/pw-darwin.git/blobdiff_plain/142a7605c2947afa39e259b722ca745916009e2c..a7ab628cc9c2656a3d2f7d8c2b1fae9aeafae272:/adduser/adduser.sh diff --git a/adduser/adduser.sh b/adduser/adduser.sh index 8e05f33..b9abd81 100644 --- a/adduser/adduser.sh +++ b/adduser/adduser.sh @@ -1,5 +1,7 @@ #!/bin/sh # +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# # Copyright (c) 2002-2004 Michael Telahun Makonnen. All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -488,6 +490,7 @@ get_uid() { _prompt= if [ -n "$uuid" ]; then + uuid=`get_nextuid $uuid` _prompt="Uid [$uuid]: " else _prompt="Uid (Leave empty for default): " @@ -730,10 +733,10 @@ input_interactive() { trap 'stty echo; exit' 0 1 2 3 15 stty -echo echo -n "Enter password: " - read -r upass + IFS= read -r upass echo'' echo -n "Enter password again: " - read -r _passconfirm + IFS= read -r _passconfirm echo '' stty echo # if user entered a blank password @@ -874,7 +877,7 @@ disableflag= Dflag= Sflag= readconfig="yes" -homeprefix="/home" +homeprefix="/var" randompass= fileline= savedpwtype= @@ -894,7 +897,7 @@ if [ "$procowner" != "0" ]; then exit 1 fi -# Overide from our conf file +# Override from our conf file # Quickly go through the commandline line to see if we should read # from our configuration file. The actual parsing of the commandline # arguments happens after we read in our configuration file (commandline @@ -914,7 +917,7 @@ if [ -n "$readconfig" ]; then fi fi -# Proccess command-line options +# Process command-line options # for _switch ; do case $_switch in