0d378e905e
always explicitely execute installer modules with ./name instead of relying that the path contians the dot.
38 lines
868 B
Bash
Executable file
38 lines
868 B
Bash
Executable file
#!/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 -d dhcp 'Configuration method' manual dhcp
|
|
ethermethod=$rd
|
|
gwaddr=xxx
|
|
ipaddr=xxx
|
|
ipmask=xxx
|
|
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
|
|
|
|
case checkdone
|
|
if(! ~ $ethermethod manual dhcp) {
|
|
configether=notdone
|
|
export configether
|
|
}
|
|
if(~ $ethermethod manual && ~ 0 $#ipaddr $#ipmask $#gwaddr) {
|
|
configether=notdone
|
|
export configether
|
|
}
|
|
}
|