diff options
author | Mike Makonnen <mtm@FreeBSD.org> | 2007-04-12 08:17:56 +0000 |
---|---|---|
committer | Mike Makonnen <mtm@FreeBSD.org> | 2007-04-12 08:17:56 +0000 |
commit | fb837ad329d454f75a3c72bb4a3befa0b07a0fe4 (patch) | |
tree | 3778218877e828937c5c3d80566268e5fd258e06 /adduser/adduser.sh | |
parent | cc5d110a779c35aba1139cdc53d7903f20b7bffb (diff) | |
download | pw-darwin-fb837ad329d454f75a3c72bb4a3befa0b07a0fe4.tar.gz pw-darwin-fb837ad329d454f75a3c72bb4a3befa0b07a0fe4.tar.zst pw-darwin-fb837ad329d454f75a3c72bb4a3befa0b07a0fe4.zip |
There are a couple of bugs in rev. 1.27:
1) The man page should describe the code, not the other way around.
2) Internal variables should not be documented or exposed, except in
controlled circumstances (i.e. - That's what the -C flag is for).
The variable should have been saved to the config file in save_config().
3) The next available userid doesn't get automatically updated. The
end-result is the same (user gets added with the correct uid),
but in an interactive session the default uid doesn't get updated in
the display.
So,
o Use the uidstart variable instead of uuid (bug #3)
o Actually save the variable to adduser.conf (bug #2)
o (bug #1 to be fixed in an upcomming commit to adduser.conf.5)
MFC After: 2 weeks
Diffstat (limited to 'adduser/adduser.sh')
-rw-r--r-- | adduser/adduser.sh | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/adduser/adduser.sh b/adduser/adduser.sh index 5b970dc..b7b97e0 100644 --- a/adduser/adduser.sh +++ b/adduser/adduser.sh @@ -199,6 +199,7 @@ save_config() { echo "udotdir=$udotdir" >> ${ADDUSERCONF} echo "msgfile=$msgfile" >> ${ADDUSERCONF} echo "disableflag=$disableflag" >> ${ADDUSERCONF} + echo "uidstart=$uidstart" >> ${ADDUSERCONF} } # add_user @@ -453,16 +454,10 @@ get_homedir() { # allocates one if it is not specified. # get_uid() { - if [ -z "$uuid" ]; then - uuid=${uidstart} - fi - + uuid=${uidstart} _input= _prompt= - # No need to take down uids for a configuration saving run. - [ -n "$configflag" ] && return - if [ -n "$uuid" ]; then _prompt="Uid [$uuid]: " else |