View | Details | Raw Unified | Return to bug 211617
Collapse All | Expand All

(-)b/scripts/netconfig_ipv4 (-2 / +19 lines)
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
################################################################################
(-)b/scripts/netconfig_ipv6 (-3 / +19 lines)
Lines 70-81 while : ; do Link Here
70
			err=$( rtsol -F $INTERFACE 2>&1 )
70
			err=$( rtsol -F $INTERFACE 2>&1 )
71
			if [ $? -ne 0 ]; then
71
			if [ $? -ne 0 ]; then
72
				f_dprintf "%s" "$err"
72
				f_dprintf "%s" "$err"
73
				bsddialog --backtitle "$OSNAME Installer" --msgbox "SLAAC failed." 0 0
73
				bsddialog --backtitle "$OSNAME Installer" --title "Error" \
74
					--msgbox "SLAAC failed." 0 0
74
				AGAIN=" again"
75
				AGAIN=" again"
75
				continue
76
				continue
76
			fi
77
			fi
77
		fi
78
		fi
78
		echo ifconfig_${INTERFACE}_ipv6=\"inet6 accept_rtadv\" >> $BSDINSTALL_TMPETC/._rc.conf.net
79
		echo ifconfig_${INTERFACE}_ipv6=\"inet6 accept_rtadv\" >> $BSDINSTALL_TMPETC/._rc.conf.net
80
		if [ $? -ne 0 ]; then
81
			bsddialog --backtitle "$OSNAME Installer" --title "Error" \
82
			       --msgbox "Could not save the network configuration." 0 0
83
			exit 1
84
		fi
79
		exit 0
85
		exit 0
80
	else
86
	else
81
		break
87
		break
Lines 147-162 BEGIN { Link Here
147
}' >> $BSDINSTALL_TMPETC/._rc.conf.net
153
}' >> $BSDINSTALL_TMPETC/._rc.conf.net
148
retval=$?
154
retval=$?
149
155
156
if [ $retval -ne 0 ]; then
157
	bsddialog --backtitle "$OSNAME Installer" --title "Error" \
158
	       --msgbox "Could not save the network configuration." 0 0
159
	exit $retval
160
fi
161
150
if [ "$BSDINSTALL_CONFIGCURRENT" ]; then
162
if [ "$BSDINSTALL_CONFIGCURRENT" ]; then
151
	. $BSDINSTALL_TMPETC/._rc.conf.net
163
	. $BSDINSTALL_TMPETC/._rc.conf.net
152
	ifconfig ${INTERFACE} `eval echo \\\$ifconfig_${INTERFACE}_ipv6`
164
	ifconfig ${INTERFACE} `eval echo \\\$ifconfig_${INTERFACE}_ipv6`
153
	if [ "$ipv6_defaultrouter" ]; then
165
	retval=$?
166
	if [ $retval -eq 0 -a -n "$ipv6_defaultrouter" ]; then
154
		route delete -inet6 default
167
		route delete -inet6 default
155
		route add -inet6 default ${ipv6_defaultrouter}
168
		route add -inet6 default ${ipv6_defaultrouter}
156
		retval=$?
169
		retval=$?
157
	fi
170
	fi
158
fi
171
fi
159
172
173
if [ $retval -ne 0 ]; then
174
	bsddialog --backtitle "$OSNAME Installer" --title "Error" \
175
	       --msgbox "Could not apply the network configuration." 0 0
176
fi
160
exit $retval
177
exit $retval
161
178
162
################################################################################
179
################################################################################
163
- 

Return to bug 211617