]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
fix IPv6 nits
authorFrancis Dupont <fdupont@isc.org>
Fri, 30 Nov 2007 21:28:29 +0000 (21:28 +0000)
committerFrancis Dupont <fdupont@isc.org>
Fri, 30 Nov 2007 21:28:29 +0000 (21:28 +0000)
client/scripts/freebsd

index 05c41a97675b5d40b79a7999081c07b92a2b63fd..988c9ef056a1513fc3f5601c9702cb9f8f526016 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $Id: freebsd,v 1.19 2007/06/06 22:57:32 each Exp $
+# $Id: freebsd,v 1.20 2007/11/30 21:28:29 fdupont Exp $
 #
 # $FreeBSD$
 
@@ -38,7 +38,7 @@ make_resolv_conf() {
       # If there were no errors, attempt to mv the new file into place.
       if [ $exit_status -eq 0 ]; then
        ( mv /etc/resolv.conf.dhclient /etc/resolv.conf )
-       exit_status = $?
+       exit_status=$?
       fi
 
       if [ $exit_status -ne 0 ]; then
@@ -60,12 +60,12 @@ make_resolv_conf() {
          break
        fi
         ( echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 )
-       exit_status = $?
+       exit_status=$?
       done
 
-      if [ $exit_status -ne 0 ] ; then
+      if [ $exit_status -eq 0 ] ; then
         ( mv /etc/resolv.conf.dhclient6 /etc/resolv.conf )
-       exit_status = $?
+       exit_status=$?
       fi
 
       if [ $exit_status -ne 0 ] ; then
@@ -302,7 +302,7 @@ if [ ${reason} = BOUND6 ] ; then
     exit_with_hooks 2;
   fi
 
-  ifconfig ${interface} inet6 alias ${new_ip6_address}/${new_ip6_prefixlen}
+  ifconfig ${interface} inet6 ${new_ip6_address}/${new_ip6_prefixlen} alias
 
   # Check for nameserver options.
   make_resolv_conf
@@ -339,7 +339,7 @@ if [ ${reason} = EXPIRE6 -o ${reason} = RELEASE6 -o ${reason} = STOP6 ] ; then
     exit_with_hooks 2;
   fi
 
-  ifconfig ${interface} inet6 -alias ${old_ip6_address}/${old_ip6_prefixlen}
+  ifconfig ${interface} inet6 ${old_ip6_address}/${old_ip6_prefixlen} -alias
 
   exit_with_hooks 0
 fi