summaryrefslogtreecommitdiffstats
path: root/debian/scripts/dhcp6c-ifupdown
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:43:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:43:03 +0000
commitf504d0d8a469f3f913a853e97020112fcf262c1b (patch)
tree25a4b573f8fc510c99d931a382598bee699a215c /debian/scripts/dhcp6c-ifupdown
parentAdding upstream version 20080615. (diff)
downloadwide-dhcpv6-debian.tar.xz
wide-dhcpv6-debian.zip
Adding debian version 20080615-23.debian/20080615-23debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/scripts/dhcp6c-ifupdown28
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/scripts/dhcp6c-ifupdown b/debian/scripts/dhcp6c-ifupdown
new file mode 100644
index 0000000..1a9bfab
--- /dev/null
+++ b/debian/scripts/dhcp6c-ifupdown
@@ -0,0 +1,28 @@
+#!/bin/sh
+# Updates information whenever a network interface is brought up.
+
+[ "$IFACE" = "lo" ] && exit 0
+[ -r /etc/default/wide-dhcpv6-client ] || exit 0
+[ -x /usr/sbin/dhcp6ctl ] || exit 0
+
+# Check if dhcp6c is running
+pidof dhcp6c > /dev/null 2>&1 ; [ $? -eq 1 ] && exit 0
+
+. /etc/default/wide-dhcpv6-client
+
+case $MODE in
+ start|stop)
+ for i in $INTERFACES ; do
+ if [ "$IFACE" = "$i" ] ; then
+ /usr/sbin/dhcp6ctl $MODE interface $IFACE
+ exit 0
+ fi
+ done
+ ;;
+ *)
+ if [ "$VERBOSITY" = "1" ] ; then
+ echo "dhcp6c-ifupdown: unknown mode \"$MODE\""
+ fi
+ exit 1
+ ;;
+esac