FreeBSD Bugzilla – Attachment 243627 Details for
Bug 211617
`bsdinstall` looping on Subnet Mask
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-netconfig-report-failures-to-save-or-apply-configura.patch
0001-netconfig-report-failures-to-save-or-apply-configura.patch (text/plain), 3.90 KB, created by
Pierre Pronchery
on 2023-07-26 13:29:51 UTC
(
hide
)
Description:
0001-netconfig-report-failures-to-save-or-apply-configura.patch
Filename:
MIME Type:
Creator:
Pierre Pronchery
Created:
2023-07-26 13:29:51 UTC
Size:
3.90 KB
patch
obsolete
>From 5bb4c8a56a06443543b4cbe4a8019129e6b1f1c3 Mon Sep 17 00:00:00 2001 >From: Pierre Pronchery <pierre@freebsdfoundation.org> >Date: Wed, 26 Jul 2023 14:35:29 +0200 >Subject: [PATCH] netconfig: report failures to save or apply configuration > >PR: #211617 >Sponsored by: The FreeBSD Foundation >--- > scripts/netconfig_ipv4 | 21 +++++++++++++++++++-- > scripts/netconfig_ipv6 | 21 +++++++++++++++++++-- > 2 files changed, 38 insertions(+), 4 deletions(-) > >diff --git a/scripts/netconfig_ipv4 b/scripts/netconfig_ipv4 >index b5c10fb..6139d78 100755 >--- a/scripts/netconfig_ipv4 >+++ b/scripts/netconfig_ipv4 >@@ -61,11 +61,17 @@ if [ $? -eq $BSDDIALOG_OK ]; then > 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 > >@@ -89,6 +95,12 @@ echo $INTERFACE $IF_CONFIG | > }' >> $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 >@@ -96,13 +108,18 @@ if [ "$BSDINSTALL_CONFIGCURRENT" ]; then > else > ifconfig $INTERFACE `eval echo \\\$ifconfig_$INTERFACE` > fi >- if [ "$defaultrouter" ]; then >+ retval=$? >+ if [ $retval -eq 0 -a -n "$defaultrouter" ]; then > route delete -inet default > 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/scripts/netconfig_ipv6 b/scripts/netconfig_ipv6 >index f07746c..c1888ba 100755 >--- a/scripts/netconfig_ipv6 >+++ b/scripts/netconfig_ipv6 >@@ -70,12 +70,18 @@ while : ; do > 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 >@@ -147,16 +153,27 @@ BEGIN { > }' >> $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 >+ retval=$? >+ if [ $retval -eq 0 -a -n "$ipv6_defaultrouter" ]; then > route delete -inet6 default > 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 > > ################################################################################ >-- >2.41.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 211617
: 243627