diff options
author | Alexander Hall <halex@cvs.openbsd.org> | 2010-08-04 07:07:42 +0000 |
---|---|---|
committer | Alexander Hall <halex@cvs.openbsd.org> | 2010-08-04 07:07:42 +0000 |
commit | 18d7c02f7e490200ade5bdd07da62b400fd28b37 (patch) | |
tree | 12261b98c68addbf9fe22d4ba47fd5ca30c218e1 /distrib/miniroot/install.sh | |
parent | 8d4360f2cdc358d8e386ac6dfea1fefcb389e609 (diff) |
Set an appropriate To: header in /var/mail/$user which is copied from
/var/mail/root
idea and first version from deraadt@, ok deraadt@ krw@
Diffstat (limited to 'distrib/miniroot/install.sh')
-rw-r--r-- | distrib/miniroot/install.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh index 3374073a9d8..d9b4b63a21a 100644 --- a/distrib/miniroot/install.sh +++ b/distrib/miniroot/install.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sh,v 1.207 2010/04/06 21:01:20 deraadt Exp $ +# $OpenBSD: install.sh,v 1.208 2010/08/04 07:07:41 halex Exp $ # $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback @@ -290,7 +290,9 @@ if [[ -n $user ]]; then mkdir -p /mnt/home/$user (cd /mnt/etc/skel; cp -pR . /mnt/home/$user) - cp -p /mnt/var/mail/root /mnt/var/mail/$user + ( umask 077 && + sed "s,^To: root\$,To: ${username} <${user}>," \ + /mnt/var/mail/root > /mnt/var/mail/$user ) chown -R 1000.10 /mnt/home/$user /mnt/var/mail/$user echo "1,s@wheel:.:0:root\$@wheel:\*:0:root,${user}@ w |