From 81a3c7b2d2c5260eebf386585cde2281553b6ba4 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 13 May 2009 00:44:27 +0000 Subject: [PATCH] contrib/package/freifunk-watchdog: add sysupgrade hook to terminate ffwatchd before system upgrade --- contrib/package/freifunk-watchdog/Makefile | 2 ++ contrib/package/freifunk-watchdog/files/sysupgrade.hook | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 contrib/package/freifunk-watchdog/files/sysupgrade.hook 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" -- 2.25.1