use alias interfaces for network configuration if only ifconfig is available
authorLennart Poettering <lennart@poettering.net>
Mon, 4 Sep 2006 18:10:26 +0000 (18:10 +0000)
committerLennart Poettering <lennart@poettering.net>
Mon, 4 Sep 2006 18:10:26 +0000 (18:10 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1319 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-autoipd/avahi-autoipd.action

index ba041aa..27f00bb 100755 (executable)
@@ -55,18 +55,11 @@ elif [ -x /bin/ifconfig -o -x /sbin/ifconfig ] ; then
 
     case "$1" in
         BIND)
-            ifconfig "$2" inet "$3" netmask 255.255.0.0 broadcast 169.254.255.255
+            ifconfig "$2:3" inet "$3" netmask 255.255.0.0 broadcast 169.254.255.255 up
             ;;
 
-        CONFLICT|STOP)
-            ifconfig "$2" inet 0
-            ;;
-
-        UNBIND)
-            # This event is triggered when some other tool configured
-            # a routable address for this interface. That IP address
-            # probably overwrote ours, so let's not remove it again
-            # here.
+        CONFLICT|STOP|UNBIND)
+            ifconfig "$2:3" down
             ;;
 
         *)
@@ -74,6 +67,7 @@ elif [ -x /bin/ifconfig -o -x /sbin/ifconfig ] ; then
             exit 1
             ;;
     esac
+
 else
 
     echo "No network configuration tool found." >&2