X-Git-Url: https://git.decadent.org.uk/gitweb/?p=odhcp6c.git;a=blobdiff_plain;f=debian%2Fodhcp6c.ppp.ipv6-down;fp=debian%2Fodhcp6c.ppp.ipv6-down;h=89a8967a295601ef05232675adbde33da6039fbb;hp=0000000000000000000000000000000000000000;hb=cfcc4d1393c5563418c620117f8cc8ce9644876b;hpb=f4f09bbf91b0edf7d29b6a266dfaa5390f15b40f diff --git a/debian/odhcp6c.ppp.ipv6-down b/debian/odhcp6c.ppp.ipv6-down new file mode 100755 index 0000000..89a8967 --- /dev/null +++ b/debian/odhcp6c.ppp.ipv6-down @@ -0,0 +1,12 @@ +#!/bin/sh +IFACE="$1" +PID="$(cat "/run/odhcp6c.$IFACE.pid" 2>/dev/null)" + +# Was a pid recorded and does the process still exist? +# XXX should check process name too +if [ -n "$PID" ] && kill -0 $PID; then + # XXX this doesn't currently remove the pid file + kill $PID +else + rm -f "/run/odhcp6c.$IFACE.pid" +fi