Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163241071
D42193.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D42193.id.diff
View Options
diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 b/usr.sbin/bsdinstall/scripts/netconfig_ipv4
--- a/usr.sbin/bsdinstall/scripts/netconfig_ipv4
+++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv4
@@ -59,11 +59,17 @@
err=$( pkill -F /var/run/dhclient/dhclient.${INTERFACE}.pid; dhclient $INTERFACE 2>&1 )
if [ $? -ne 0 ]; then
f_dprintf "%s" "$err"
- bsddialog --backtitle "$OSNAME Installer" --msgbox "DHCP lease acquisition failed." 0 0
+ bsddialog --backtitle "$OSNAME Installer" --title "Error" \
+ --msgbox "DHCP lease acquisition failed." 0 0
exec $0 ${INTERFACE} "${IFCONFIG_PREFIX}"
fi
fi
echo ifconfig_$INTERFACE=\"${IFCONFIG_PREFIX}DHCP\" >> $BSDINSTALL_TMPETC/._rc.conf.net
+ if [ $? -ne 0 ]; then
+ bsddialog --backtitle "$OSNAME Installer" --title "Error" \
+ --msgbox "Could not save the network configuration." 0 0
+ exit 1
+ fi
exit 0
fi
@@ -87,6 +93,12 @@
}' >> $BSDINSTALL_TMPETC/._rc.conf.net
retval=$?
+if [ $retval -ne 0 ]; then
+ bsddialog --backtitle "$OSNAME Installer" --title "Error" \
+ --msgbox "Could not save the network configuration." 0 0
+ exit $retval
+fi
+
if [ "$BSDINSTALL_CONFIGCURRENT" ]; then
. $BSDINSTALL_TMPETC/._rc.conf.net
if [ -n "$2" ]; then
@@ -94,13 +106,18 @@
else
ifconfig $INTERFACE `eval echo \\\$ifconfig_$INTERFACE`
fi
- if [ "$defaultrouter" ]; then
- route delete -inet default
+ retval=$?
+ route delete -inet default
+ if [ $retval -eq 0 -a -n "$defaultrouter" ]; then
route add -inet default $defaultrouter
retval=$?
fi
fi
+if [ $retval -ne 0 ]; then
+ bsddialog --backtitle "$OSNAME Installer" --title "Error" \
+ --msgbox "Could not apply the network configuration." 0 0
+fi
exit $retval
################################################################################
diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 b/usr.sbin/bsdinstall/scripts/netconfig_ipv6
--- a/usr.sbin/bsdinstall/scripts/netconfig_ipv6
+++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv6
@@ -68,12 +68,18 @@
err=$( rtsol -F $INTERFACE 2>&1 )
if [ $? -ne 0 ]; then
f_dprintf "%s" "$err"
- bsddialog --backtitle "$OSNAME Installer" --msgbox "SLAAC failed." 0 0
+ bsddialog --backtitle "$OSNAME Installer" --title "Error" \
+ --msgbox "SLAAC failed." 0 0
AGAIN=" again"
continue
fi
fi
echo ifconfig_${INTERFACE}_ipv6=\"inet6 accept_rtadv\" >> $BSDINSTALL_TMPETC/._rc.conf.net
+ if [ $? -ne 0 ]; then
+ bsddialog --backtitle "$OSNAME Installer" --title "Error" \
+ --msgbox "Could not save the network configuration." 0 0
+ exit 1
+ fi
exit 0
else
break
@@ -145,16 +151,27 @@
}' >> $BSDINSTALL_TMPETC/._rc.conf.net
retval=$?
+if [ $retval -ne 0 ]; then
+ bsddialog --backtitle "$OSNAME Installer" --title "Error" \
+ --msgbox "Could not save the network configuration." 0 0
+ exit $retval
+fi
+
if [ "$BSDINSTALL_CONFIGCURRENT" ]; then
. $BSDINSTALL_TMPETC/._rc.conf.net
ifconfig ${INTERFACE} `eval echo \\\$ifconfig_${INTERFACE}_ipv6`
- if [ "$ipv6_defaultrouter" ]; then
- route delete -inet6 default
+ retval=$?
+ route delete -inet6 default
+ if [ $retval -eq 0 -a -n "$ipv6_defaultrouter" ]; then
route add -inet6 default ${ipv6_defaultrouter}
retval=$?
fi
fi
+if [ $retval -ne 0 ]; then
+ bsddialog --backtitle "$OSNAME Installer" --title "Error" \
+ --msgbox "Could not apply the network configuration." 0 0
+fi
exit $retval
################################################################################
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 22, 8:32 AM (12 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35356752
Default Alt Text
D42193.id.diff (3 KB)
Attached To
Mode
D42193: [PATCH 1/2] netconfig: report configuration failures
Attached
Detach File
Event Timeline
Log In to Comment