From 45bab89362ebe122d60d5e9b1e2b949b26168db3 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 11 Apr 2011 19:47:05 +0000 Subject: livecd --- sys/lib/dist.old/pc/inst/configether | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 sys/lib/dist.old/pc/inst/configether (limited to 'sys/lib/dist.old/pc/inst/configether') diff --git a/sys/lib/dist.old/pc/inst/configether b/sys/lib/dist.old/pc/inst/configether new file mode 100755 index 000000000..0922ea339 --- /dev/null +++ b/sys/lib/dist.old/pc/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 + } +} -- cgit v1.2.3