summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pc-sysinstall/backend/functions-networking.sh
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2010-08-24 06:11:46 +0000
committerimp <imp@FreeBSD.org>2010-08-24 06:11:46 +0000
commit2060372a39e9b61f9a53cad829c81f473a5e97fe (patch)
treedb2a07307938f253f872e1c9c27609a144cb8819 /usr.sbin/pc-sysinstall/backend/functions-networking.sh
parent57bdb49e0c58bd5e0f158543f28aaef8711600c0 (diff)
downloadFreeBSD-src-2060372a39e9b61f9a53cad829c81f473a5e97fe.zip
FreeBSD-src-2060372a39e9b61f9a53cad829c81f473a5e97fe.tar.gz
Indent things consistently
PR: 149926 Submitted by: John Hixson
Diffstat (limited to 'usr.sbin/pc-sysinstall/backend/functions-networking.sh')
-rwxr-xr-xusr.sbin/pc-sysinstall/backend/functions-networking.sh25
1 files changed, 13 insertions, 12 deletions
diff --git a/usr.sbin/pc-sysinstall/backend/functions-networking.sh b/usr.sbin/pc-sysinstall/backend/functions-networking.sh
index 900e54a..22602a9 100755
--- a/usr.sbin/pc-sysinstall/backend/functions-networking.sh
+++ b/usr.sbin/pc-sysinstall/backend/functions-networking.sh
@@ -68,8 +68,8 @@ get_first_wired_nic()
check_is_wifi ${NIC}
if [ "$?" != "0" ]
then
- VAL="${NIC}" ; export VAL
- return
+ VAL="${NIC}" ; export VAL
+ return
fi
done < ${TMPDIR}/.niclist
fi
@@ -241,22 +241,23 @@ enable_auto_dhcp()
is_nic_active "${NIC}"
if [ "$?" = "0" ] ; then
- echo_log "Trying DHCP on $NIC $DESC"
- dhclient ${NIC} >/dev/null 2>/dev/null
- if [ "$?" = "0" ] ; then
- # Got a valid DHCP IP, we can return now
- WRKNIC="$NIC" ; export WRKNIC
- return 0
- fi
+ echo_log "Trying DHCP on $NIC $DESC"
+ dhclient ${NIC} >/dev/null 2>/dev/null
+ if [ "$?" = "0" ] ; then
+ # Got a valid DHCP IP, we can return now
+ WRKNIC="$NIC" ; export WRKNIC
+ return 0
+ fi
fi
done < ${TMPDIR}/.niclist
};
# Get the mac address of a target NIC
-get_nic_mac() {
- FOUNDMAC="`ifconfig ${1} | grep 'ether' | tr -d '\t' | cut -d ' ' -f 2`"
- export FOUNDMAC
+get_nic_mac()
+{
+ FOUNDMAC="`ifconfig ${1} | grep 'ether' | tr -d '\t' | cut -d ' ' -f 2`"
+ export FOUNDMAC
}
# Function which performs the manual setup of a target nic in the cfg
OpenPOWER on IntegriCloud