From 0fde74f6fd95367e3c90df899b21acbb5b010789 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 4 Sep 2006 18:10:26 +0000 Subject: use alias interfaces for network configuration if only ifconfig is available git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1319 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-autoipd/avahi-autoipd.action | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/avahi-autoipd/avahi-autoipd.action b/avahi-autoipd/avahi-autoipd.action index ba041aa..27f00bb 100755 --- a/avahi-autoipd/avahi-autoipd.action +++ b/avahi-autoipd/avahi-autoipd.action @@ -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 -- cgit