#!/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$
# 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
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
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
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