|
Lines 242-248
Link Here
|
| 242 |
GATEWAY=$(tail -n 1 ${iface}.GW) |
242 |
GATEWAY=$(tail -n 1 ${iface}.GW) |
| 243 |
dialog --visit-items --title "DNS server" --inputbox "Please enter a name server to use (hit enter for none:)" 20 50 2> ${iface}.DNS |
243 |
dialog --visit-items --title "DNS server" --inputbox "Please enter a name server to use (hit enter for none:)" 20 50 2> ${iface}.DNS |
| 244 |
DNS=$(tail -n 1 ${iface}.DNS) |
244 |
DNS=$(tail -n 1 ${iface}.DNS) |
| 245 |
/sbin/ifconfig ${iface} ${IP} broadcast ${BROADCAST} netmask ${NETMASK} |
245 |
/bin/ifconfig ${iface} ${IP} broadcast ${BROADCAST} netmask ${NETMASK} |
| 246 |
if [ -n "${GATEWAY}" ] |
246 |
if [ -n "${GATEWAY}" ] |
| 247 |
then |
247 |
then |
| 248 |
/sbin/route add default gw ${GATEWAY} dev ${iface} netmask 0.0.0.0 metric 1 |
248 |
/sbin/route add default gw ${GATEWAY} dev ${iface} netmask 0.0.0.0 metric 1 |
|
Lines 386-399
Link Here
|
| 386 |
local opts |
386 |
local opts |
| 387 |
IFS=" |
387 |
IFS=" |
| 388 |
" |
388 |
" |
| 389 |
for ifname in $(/sbin/ifconfig -a | grep "^[^ ]"); do |
389 |
for ifname in $(/bin/ifconfig -a | grep "^[^ ]"); do |
| 390 |
ifname="${ifname%% *}" |
390 |
ifname="${ifname%%: *}" |
| 391 |
[[ ${ifname} == "lo" ]] && continue |
391 |
[[ ${ifname} == "lo" ]] && continue |
| 392 |
opts="${opts} ${ifname} '$(get_ifdesc ${ifname})'" |
392 |
opts="${opts} ${ifname} '$(get_ifdesc ${ifname})'" |
| 393 |
done |
393 |
done |
| 394 |
IFS="${old_ifs}" |
394 |
IFS="${old_ifs}" |
| 395 |
|
395 |
|
| 396 |
if ! eval dialog --visit-items --menu "Please select the interface that you wish to configure from the list below:" 0 0 0 $opts 2>iface |
396 |
if ! eval dialog --visit-items --menu \"Please select the interface that you wish to configure from the list below:\" 0 0 0 $opts 2>iface |
| 397 |
then |
397 |
then |
| 398 |
exit |
398 |
exit |
| 399 |
fi |
399 |
fi |