summaryrefslogtreecommitdiffstats
path: root/avahi-autoipd/dhclient-enter-hook.in
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-09-02 14:45:59 +0000
committerLennart Poettering <lennart@poettering.net>2006-09-02 14:45:59 +0000
commitdeb30fa40d8131132d2d05b4439a0d773766f21b (patch)
tree36a6c1b808058396a6c8632f2c3200cd56fcbb1c /avahi-autoipd/dhclient-enter-hook.in
parent40de1a34d5663c55215d56ceaecc1411a6dfd8f8 (diff)
ship dhclient hook scripts for using ipv4ll as fallback solution where DHCP is not available. Only installed on Debian for now, since only Debian provides the necessary hook directories.
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1311 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-autoipd/dhclient-enter-hook.in')
-rwxr-xr-xavahi-autoipd/dhclient-enter-hook.in35
1 files changed, 35 insertions, 0 deletions
diff --git a/avahi-autoipd/dhclient-enter-hook.in b/avahi-autoipd/dhclient-enter-hook.in
new file mode 100755
index 0000000..8efd468
--- /dev/null
+++ b/avahi-autoipd/dhclient-enter-hook.in
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# $Id$
+#
+# This file is part of avahi.
+#
+# avahi is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# avahi is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+set -e
+
+case "$reason" in
+ MEDIUM|ARPCHECK|ARPSEND|NBI)
+ ;;
+
+ PREINIT|BOUND|RENEW|REBIND|REBOOT|STOP)
+ @sbindir@/avahi-autoipd -k $interface 2> /dev/null
+ ;;
+
+ EXPIRE|FAIL|RELEASE|TIMEOUT)
+ # Starting avahi-autoipd is left for the exit hook
+ ;;
+esac