diff options
author | Christian Hesse <mail@eworm.de> | 2013-10-31 19:23:50 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-10-31 19:23:50 +0100 |
commit | 4c50bfc7c8f6c1575586dde1d5053d72dc0b4937 (patch) | |
tree | b6683d864c81b499365e8f3819c0919720893795 | |
parent | 64fbfb8c89723ddefd13e7850cb418023da919f5 (diff) | |
download | pacredir-4c50bfc7c8f6c1575586dde1d5053d72dc0b4937.tar.gz pacredir-4c50bfc7c8f6c1575586dde1d5053d72dc0b4937.tar.zst |
add dhcpcd hook that informs pacredir about reestablished connection
-rw-r--r-- | Makefile | 1 | ||||
-rwxr-xr-x | dhcpcd/80-pacredir | 11 |
2 files changed, 12 insertions, 0 deletions
@@ -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 |