summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorjpaetzel <jpaetzel@FreeBSD.org>2012-03-12 20:44:44 +0000
committerjpaetzel <jpaetzel@FreeBSD.org>2012-03-12 20:44:44 +0000
commit7a6ef61eacf136900ffdcc2815b420cce3b5faa5 (patch)
treeeba2ba6ba868d6b41cebd4ecd3162a1c8d511f98 /usr.sbin
parent854a054ed5ebd64c60c3d5e0b3f81cbf1ad08ec7 (diff)
downloadFreeBSD-src-7a6ef61eacf136900ffdcc2815b420cce3b5faa5.zip
FreeBSD-src-7a6ef61eacf136900ffdcc2815b420cce3b5faa5.tar.gz
Fix a couple of bugs saving network config.
Don't duplicate wlans_ lines. Enable ipv6 on wireless devices correctly. Submitted by: kris Obtained from: PC-BSD
Diffstat (limited to 'usr.sbin')
-rwxr-xr-xusr.sbin/pc-sysinstall/backend/functions-networking.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/usr.sbin/pc-sysinstall/backend/functions-networking.sh b/usr.sbin/pc-sysinstall/backend/functions-networking.sh
index 6b8cb1e..d8e3da7 100755
--- a/usr.sbin/pc-sysinstall/backend/functions-networking.sh
+++ b/usr.sbin/pc-sysinstall/backend/functions-networking.sh
@@ -104,7 +104,10 @@ enable_dhcp_all()
then
# We have a wifi device, setup a wlan* entry for it
WLAN="wlan${WLANCOUNT}"
- echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf
+ cat ${FSMNT}/etc/rc.conf | grep -q "wlans_${NIC}="
+ if [ $? -ne 0 ] ; then
+ echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf
+ fi
echo "ifconfig_${WLAN}=\"DHCP\"" >>${FSMNT}/etc/rc.conf
CNIC="${WLAN}"
WLANCOUNT=$((WLANCOUNT+1))
@@ -138,7 +141,7 @@ enable_slaac_all()
do
NIC="`echo $line | cut -d ':' -f 1`"
DESC="`echo $line | cut -d ':' -f 2`"
- echo_log "Setting $NIC to acceptign RAs on the system."
+ echo_log "Setting $NIC to accepting RAs on the system."
check_is_wifi ${NIC}
if [ $? -eq 0 ]
then
@@ -146,9 +149,12 @@ enable_slaac_all()
# Given we cannot have DHCP and SLAAC the same time currently
# it's save to just duplicate.
WLAN="wlan${WLANCOUNT}"
- echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf
+ cat ${FSMNT}/etc/rc.conf | grep -q "wlans_${NIC}="
+ if [ $? -ne 0 ] ; then
+ echo "wlans_${NIC}=\"${WLAN}\"" >>${FSMNT}/etc/rc.conf
+ fi
#echo "ifconfig_${NIC}=\"up\"" >>${FSMNT}/etc/rc.conf
- echo "ifconfig_${WLAN}=\"inet6 accept_rtadv\"" >>${FSMNT}/etc/rc.conf
+ echo "ifconfig_${WLAN}_ipv6=\"inet6 accept_rtadv\"" >>${FSMNT}/etc/rc.conf
CNIC="${WLAN}"
WLANCOUNT=$((WLANCOUNT+1))
else
OpenPOWER on IntegriCloud