ref: ac9ea79ab309e655ce9ccdbeaa3e23ec982f5a07
parent: df5e34900848b2f3fa56d5257033da5927d10056
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Thu Mar 29 14:23:21 EDT 2012
use sysname as dhcp host
--- a/rc/bin/cpurc
+++ b/rc/bin/cpurc
@@ -44,7 +44,7 @@
ether=`{ndb/query sys $sysname ether} if(~ $#ether 1){# try /lib/ndb first, then do dhcp
- ip/ipconfig -N >[2]/dev/null || ip/ipconfig
+ ip/ipconfig -N >[2]/dev/null || ip/ipconfig -h $sysname
}
rm -f /env/ether
}
--- a/rc/bin/inst/configether
+++ b/rc/bin/inst/configether
@@ -16,28 +16,12 @@
gwaddr=xxx
ipaddr=xxx
ipmask=xxx
- switch($ethermethod){- case dhcp
- echo
- echo 'Some ISPs, notably @HOME, require a host name passed with DHCP'
- echo 'requests. An example for @HOME would be "cc1018221-a". If your'
- echo 'ISP supplied you such a name, enter it.'
- echo
- prompt -d none 'dhcp host name'; dhcphost=$rd
- switch($dhcphost){- case none
- dhcphost=();
- case *
- dhcphost=(-h $dhcphost)
- }
- export dhcphost
- case manual
+ if(~ $ethermethod manual){prompt 'ip address'; ipaddr=$rd
prompt 'network mask'; ipmask=$rd
prompt 'gateway address'; gwaddr=$rd
export ipaddr ipmask gwaddr
}
-
export ethermethod gwaddr ipaddr ipmask dhcphost
exec startether go
--- a/rc/bin/inst/startether
+++ b/rc/bin/inst/startether
@@ -19,7 +19,7 @@
case manual
ip/ipconfig -g $gwaddr ether /net/ether0 $ipaddr $ipmask >>[2]/srv/log
case dhcp
- ip/ipconfig $dhcphost >>[2]/srv/log
+ ip/ipconfig >>[2]/srv/log
}
case checkdone
--- a/rc/bin/termrc
+++ b/rc/bin/termrc
@@ -53,7 +53,7 @@
ether=`{ndb/query sys $sysname ether} if(~ $#ether 1){# try /lib/ndb first, then do dhcp
- ip/ipconfig -N >[2]/dev/null || ip/ipconfig
+ ip/ipconfig -N >[2]/dev/null || ip/ipconfig -h $sysname
}
rm -f /env/ether
}
--
⑨