diff options
author | Lennart Poettering <lennart@poettering.net> | 2006-09-04 18:10:26 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2006-09-04 18:10:26 +0000 |
commit | 0fde74f6fd95367e3c90df899b21acbb5b010789 (patch) | |
tree | 5bf9b1552d3f7618ea745d5c5b5948e887f2de44 /avahi-autoipd | |
parent | d9b9d1c9964a605b9b47265c2a3fcc6c662ef28b (diff) |
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
Diffstat (limited to 'avahi-autoipd')
-rwxr-xr-x | avahi-autoipd/avahi-autoipd.action | 14 |
1 files 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 |