luci-0.8: merge r4512
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 13 May 2009 00:45:43 +0000 (00:45 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 13 May 2009 00:45:43 +0000 (00:45 +0000)
contrib/package/freifunk-watchdog/Makefile
contrib/package/freifunk-watchdog/files/sysupgrade.hook [new file with mode: 0644]

index fc1e9d7e055bb807e623fe03ee207dd9245d8c3d..439e0478c537db4f11e7c3ada747c9da3eefcb9d 100644 (file)
@@ -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 (file)
index 0000000..e124c39
--- /dev/null
@@ -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"