diff options
author | Robert Peichaer <rpe@cvs.openbsd.org> | 2015-07-19 21:05:42 +0000 |
---|---|---|
committer | Robert Peichaer <rpe@cvs.openbsd.org> | 2015-07-19 21:05:42 +0000 |
commit | 66383dc644dae79bc75abf56de2cd4220a338428 (patch) | |
tree | 6e19c0de802f8c856a8f3acf5145b8f0b41aedc6 /distrib | |
parent | b1742b293549343bcd6a3070f812c965c8db2bc8 (diff) |
Replace two instances where ed is used for inplace editing of files
with the new sed -i.
"Nice" deraadt@
OK krw@ jasper@
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/miniroot/install.sh | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh index 8b2c8ef25ef..54141c6a71f 100644 --- a/distrib/miniroot/install.sh +++ b/distrib/miniroot/install.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sh,v 1.268 2015/06/02 19:54:06 rpe Exp $ +# $OpenBSD: install.sh,v 1.269 2015/07/19 21:05:41 rpe Exp $ # $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback @@ -341,9 +341,8 @@ if [[ -n $user ]]; then sed "s,^To: root\$,To: ${username} <${user}>," \ /mnt/var/mail/root > /mnt/var/mail/$user ) chown -R 1000:1000 $_home /mnt/var/mail/$user - echo "1,s@wheel:.:0:root\$@wheel:\*:0:root,${user}@ -w -q" | ed /mnt/etc/group 2>/dev/null + sed -i -e "s@^wheel:.:0:root\$@wheel:\*:0:root,${user}@" \ + /mnt/etc/group 2>/dev/null # During autoinstall, add public ssh key to authorized_keys. [[ -n "$userkey" ]] && @@ -353,9 +352,7 @@ fi # Store root password and rebuild password database. if [[ -n "$_rootpass" ]]; then _encr=$(encr_pwd "$_rootpass") - echo "1,s@^root::@root:${_encr}:@ -w -q" | ed /mnt/etc/master.passwd 2>/dev/null + sed -i -e "s@^root::@root:${_encr}:@" /mnt/etc/master.passwd 2>/dev/null fi pwd_mkdb -p -d /mnt/etc /etc/master.passwd |