|
Lines 61-71
if [ $? -eq $BSDDIALOG_OK ]; then
Link Here
|
| 61 |
err=$( pkill -F /var/run/dhclient/dhclient.${INTERFACE}.pid; dhclient $INTERFACE 2>&1 ) |
61 |
err=$( pkill -F /var/run/dhclient/dhclient.${INTERFACE}.pid; dhclient $INTERFACE 2>&1 ) |
| 62 |
if [ $? -ne 0 ]; then |
62 |
if [ $? -ne 0 ]; then |
| 63 |
f_dprintf "%s" "$err" |
63 |
f_dprintf "%s" "$err" |
| 64 |
bsddialog --backtitle "$OSNAME Installer" --msgbox "DHCP lease acquisition failed." 0 0 |
64 |
bsddialog --backtitle "$OSNAME Installer" --title "Error" \ |
|
|
65 |
--msgbox "DHCP lease acquisition failed." 0 0 |
| 65 |
exec $0 ${INTERFACE} "${IFCONFIG_PREFIX}" |
66 |
exec $0 ${INTERFACE} "${IFCONFIG_PREFIX}" |
| 66 |
fi |
67 |
fi |
| 67 |
fi |
68 |
fi |
| 68 |
echo ifconfig_$INTERFACE=\"${IFCONFIG_PREFIX}DHCP\" >> $BSDINSTALL_TMPETC/._rc.conf.net |
69 |
echo ifconfig_$INTERFACE=\"${IFCONFIG_PREFIX}DHCP\" >> $BSDINSTALL_TMPETC/._rc.conf.net |
|
|
70 |
if [ $? -ne 0 ]; then |
| 71 |
bsddialog --backtitle "$OSNAME Installer" --title "Error" \ |
| 72 |
--msgbox "Could not save the network configuration." 0 0 |
| 73 |
exit 1 |
| 74 |
fi |
| 69 |
exit 0 |
75 |
exit 0 |
| 70 |
fi |
76 |
fi |
| 71 |
|
77 |
|
|
Lines 89-94
echo $INTERFACE $IF_CONFIG |
Link Here
|
| 89 |
}' >> $BSDINSTALL_TMPETC/._rc.conf.net |
95 |
}' >> $BSDINSTALL_TMPETC/._rc.conf.net |
| 90 |
retval=$? |
96 |
retval=$? |
| 91 |
|
97 |
|
|
|
98 |
if [ $retval -ne 0 ]; then |
| 99 |
bsddialog --backtitle "$OSNAME Installer" --title "Error" \ |
| 100 |
--msgbox "Could not save the network configuration." 0 0 |
| 101 |
exit $retval |
| 102 |
fi |
| 103 |
|
| 92 |
if [ "$BSDINSTALL_CONFIGCURRENT" ]; then |
104 |
if [ "$BSDINSTALL_CONFIGCURRENT" ]; then |
| 93 |
. $BSDINSTALL_TMPETC/._rc.conf.net |
105 |
. $BSDINSTALL_TMPETC/._rc.conf.net |
| 94 |
if [ -n "$2" ]; then |
106 |
if [ -n "$2" ]; then |
|
Lines 96-108
if [ "$BSDINSTALL_CONFIGCURRENT" ]; then
Link Here
|
| 96 |
else |
108 |
else |
| 97 |
ifconfig $INTERFACE `eval echo \\\$ifconfig_$INTERFACE` |
109 |
ifconfig $INTERFACE `eval echo \\\$ifconfig_$INTERFACE` |
| 98 |
fi |
110 |
fi |
| 99 |
if [ "$defaultrouter" ]; then |
111 |
retval=$? |
|
|
112 |
if [ $retval -eq 0 -a -n "$defaultrouter" ]; then |
| 100 |
route delete -inet default |
113 |
route delete -inet default |
| 101 |
route add -inet default $defaultrouter |
114 |
route add -inet default $defaultrouter |
| 102 |
retval=$? |
115 |
retval=$? |
| 103 |
fi |
116 |
fi |
| 104 |
fi |
117 |
fi |
| 105 |
|
118 |
|
|
|
119 |
if [ $retval -ne 0 ]; then |
| 120 |
bsddialog --backtitle "$OSNAME Installer" --title "Error" \ |
| 121 |
--msgbox "Could not apply the network configuration." 0 0 |
| 122 |
fi |
| 106 |
exit $retval |
123 |
exit $retval |
| 107 |
|
124 |
|
| 108 |
################################################################################ |
125 |
################################################################################ |