diff options
author | cinap_lenrek <cinap_lenrek@localhost> | 2011-04-12 15:53:55 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@localhost> | 2011-04-12 15:53:55 +0000 |
commit | 67e93d6a0a4f15192638e131413b9d64c4269c76 (patch) | |
tree | 88fd1d17c4be283683a96ced44159e3ce6b6f2f7 /rc/bin/inst/configether | |
parent | 7208d528bd42f981f2535403f72e4c0d7d8df643 (diff) |
updating cwfs and moving installer in /rc/bin
Diffstat (limited to 'rc/bin/inst/configether')
-rwxr-xr-x | rc/bin/inst/configether | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/rc/bin/inst/configether b/rc/bin/inst/configether new file mode 100755 index 000000000..0922ea339 --- /dev/null +++ b/rc/bin/inst/configether @@ -0,0 +1,53 @@ +#!/bin/rc + +# desc: configure your internet connection via an ethernet card + +switch($1) { +case go + echo + echo 'Please choose a method for configuring your ethernet connection.' + echo + echo ' manual - specify IP address, network mask, gateway IP address' + echo ' dhcp - use DHCP to automatically configure' + echo + + prompt 'Configuration method' manual dhcp + ethermethod=$rd + 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 'host name'; dhcphost=$rd + switch($dhcphost){ + case none + dhcphost=(); + case * + dhcphost=(-h $dhcphost) + } + export dhcphost + case 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 + +case checkdone + if(! ~ $ethermethod manual dhcp) { + configether=notdone + export configether + } + if(~ $ethermethod manual && ~ 0 $#ipaddr $#ipmask $#gwaddr) { + configether=notdone + export configether + } +} |