diff options
Diffstat (limited to 'usr/sbin/pc-sysinstall/backend/functions-networking.sh')
-rwxr-xr-x | usr/sbin/pc-sysinstall/backend/functions-networking.sh | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/usr/sbin/pc-sysinstall/backend/functions-networking.sh b/usr/sbin/pc-sysinstall/backend/functions-networking.sh index 95eeaad..fa0fa06 100755 --- a/usr/sbin/pc-sysinstall/backend/functions-networking.sh +++ b/usr/sbin/pc-sysinstall/backend/functions-networking.sh @@ -23,7 +23,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/usr.sbin/pc-sysinstall/backend/functions-networking.sh,v 1.2 2010/06/27 16:46:11 imp Exp $ +# $FreeBSD: src/usr.sbin/pc-sysinstall/backend/functions-networking.sh,v 1.3 2010/08/24 06:11:46 imp Exp $ # Functions which perform our networking setup @@ -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 |