summaryrefslogtreecommitdiffhomepage
path: root/contrib
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-05-13 00:44:27 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-05-13 00:44:27 +0000
commit81a3c7b2d2c5260eebf386585cde2281553b6ba4 (patch)
treea7463244a5e44c8403beb90a74bc07cd15ed997e /contrib
parent2399dafe57885b88f3daa37c5ab2e5a6fbe19ccb (diff)
contrib/package/freifunk-watchdog: add sysupgrade hook to terminate ffwatchd before system upgrade
Diffstat (limited to 'contrib')
-rw-r--r--contrib/package/freifunk-watchdog/Makefile2
-rw-r--r--contrib/package/freifunk-watchdog/files/sysupgrade.hook7
2 files changed, 9 insertions, 0 deletions
diff --git a/contrib/package/freifunk-watchdog/Makefile b/contrib/package/freifunk-watchdog/Makefile
index fc1e9d7e0..439e0478c 100644
--- a/contrib/package/freifunk-watchdog/Makefile
+++ b/contrib/package/freifunk-watchdog/Makefile
@@ -47,6 +47,8 @@ define Package/freifunk-watchdog/install
$(INSTALL_BIN) ./files/freifunk-watchdog.init $(1)/etc/init.d/freifunk-watchdog
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ffwatchd $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/lib/upgrade
+ $(INSTALL_DATA) ./files/sysupgrade.hook $(1)/lib/upgrade/kill-ffwatchd.sh
endef
$(eval $(call BuildPackage,freifunk-watchdog))
diff --git a/contrib/package/freifunk-watchdog/files/sysupgrade.hook b/contrib/package/freifunk-watchdog/files/sysupgrade.hook
new file mode 100644
index 000000000..e124c39c5
--- /dev/null
+++ b/contrib/package/freifunk-watchdog/files/sysupgrade.hook
@@ -0,0 +1,7 @@
+kill_freifunk_watchdog() {
+ v "Terminating ffwatchd..."
+ killall ffwatchd
+ killall crond
+}
+
+export sysupgrade_pre_upgrade="${sysupgrade_pre_upgrade:+$sysupgrade_pre_upgrade }kill_freifunk_watchdog"