diff options
author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-10-19 06:26:49 +0000 |
---|---|---|
committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-10-19 06:26:49 +0000 |
commit | d372a3f2f5266ee06436043fe37f251b03ef1da6 (patch) | |
tree | b02e3ac8b3e8eea23441e3521562603f265f51da /adduser | |
parent | 1383e38df0e770e1c6c66b2f49c6557807c735ba (diff) | |
download | pw-darwin-d372a3f2f5266ee06436043fe37f251b03ef1da6.tar.gz pw-darwin-d372a3f2f5266ee06436043fe37f251b03ef1da6.tar.zst pw-darwin-d372a3f2f5266ee06436043fe37f251b03ef1da6.zip |
Various fixes to make this work better when called from other tools.
Submitted by: Coranth Gryphon <gryphon@healer.com> & Wolfram Schneider <wosch@cs.tu-berlin.de>
Diffstat (limited to 'adduser')
-rw-r--r-- | adduser/adduser.perl | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/adduser/adduser.perl b/adduser/adduser.perl index 5d27ddb..44fd3f8 100644 --- a/adduser/adduser.perl +++ b/adduser/adduser.perl @@ -32,7 +32,7 @@ # # Email: Wolfram Schneider <wosch@cs.tu-berlin.de> # -# $Id: adduser.perl,v 1.6 1995/04/30 19:20:25 ache Exp $ +# $Id: adduser.perl,v 1.7 1995/05/20 13:05:22 jkh Exp $ # # read variables @@ -123,6 +123,16 @@ sub shells_read { } } } + +# Allow /nonexistant and /bin/date as a valid shell for system utils + push(@list, "/nonexistant"); + push(@shellpref, "no"); + $shell{"no"} = "/nonexistant"; + + push(@list, "/bin/date"); + push(@shellpref, "date"); + $shell{"date"} = "/bin/date"; + return $err; } @@ -928,6 +938,8 @@ sub home_create { return 0; } + return mkdir("$homedir",0755) if $dotdir eq "no"; + # copy files from $dotdir to $homedir # rename 'dot.foo' files to '.foo' print "Copy files from $dotdir to $homedir\n" if $verbose; @@ -1378,7 +1390,7 @@ $home = &home_partition($home); # find HOME partition $dotdir = &dotdir_default; # check $dotdir $send_message = &message_default; # send message to new user $defaultpasswd = &password_default; # maybe use password -&config_write(0); # write variables in file +&config_write(!$verbose); # write variables in file # main loop for creating new users &new_users; # add new users |