From 4c50bfc7c8f6c1575586dde1d5053d72dc0b4937 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 31 Oct 2013 19:23:50 +0100 Subject: add dhcpcd hook that informs pacredir about reestablished connection --- Makefile | 1 + dhcpcd/80-pacredir | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100755 dhcpcd/80-pacredir diff --git a/Makefile b/Makefile index f41b033..ffba1c3 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,7 @@ install-bin: pacredir $(INSTALL) -D -m0644 systemd/pacserve.service $(DESTDIR)/usr/lib/systemd/system/pacserve.service $(INSTALL) -D -m0644 systemd/pacdbserve.service $(DESTDIR)/usr/lib/systemd/system/pacdbserve.service $(INSTALL) -D -m0644 systemd/pacredir.service $(DESTDIR)/usr/lib/systemd/system/pacredir.service + $(INSTALL) -D -m0755 dhcpcd/80-pacredir $(DESTDIR)/usr/lib/dhcpcd/dhcpcd-hooks/80-pacredir install-doc: README.html $(INSTALL) -D -m0644 README.md $(DESTDIR)/usr/share/doc/paccache/README.md diff --git a/dhcpcd/80-pacredir b/dhcpcd/80-pacredir new file mode 100755 index 0000000..50bed5c --- /dev/null +++ b/dhcpcd/80-pacredir @@ -0,0 +1,11 @@ +#!/bin/sh + +case "${reason}" in + BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT|STATIC) + # inform pacredir about reestablished connection + kill -HUP $(pgrep pacredir) + ;; + PREINIT|EXPIRE|FAIL|IPV4LL|NAK|NOCARRIER|RELEASE|STOP) + # do nothing here... + ;; +esac -- cgit v1.2.3-70-g09d2