diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-06-01 16:14:53 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-06-01 16:14:53 +0200 |
commit | 03f364d16734d08cb710ae83562fecd772a40a9d (patch) | |
tree | 09d8204db4e13a359647ffebf6aa3d85a47090d4 /rc/bin | |
parent | 48d4083efa222eab86a658d45c7511fcccd0a27b (diff) | |
download | plan9front-03f364d16734d08cb710ae83562fecd772a40a9d.tar.xz |
inst/ndbsetup: allow setting sysname more than once
In the installation, if you run the ndbsetup task n times (n > 1),
the installed /lib/ndb/local will have n sys= entries.
The problem is that ndb(8) will use the first sys= entry found, but
one would expect that the last configuration in the ndbsetup task
would be the active one.
Remove any previous entry in ndbsetup before adding new one.
Diffstat (limited to 'rc/bin')
-rwxr-xr-x | rc/bin/inst/ndbsetup | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rc/bin/inst/ndbsetup b/rc/bin/inst/ndbsetup index fecf4aed2..ad795d9e5 100755 --- a/rc/bin/inst/ndbsetup +++ b/rc/bin/inst/ndbsetup @@ -25,7 +25,10 @@ case go prompt $default 'sysname' sysname=$rd + cp /n/newfs/lib/ndb/local /tmp/ndb.local { + ssam 'x/^.*ether='^$etheraddr^'.*$/ d' /tmp/ndb.local + echo switch($ethermethod){ case dhcp @@ -36,5 +39,5 @@ case go 'ip='^$ipaddr 'ipmask='^$ipmask 'ipgw='^$gwaddr } echo - } >>/n/newfs/lib/ndb/local + } >/n/newfs/lib/ndb/local } |