contrib/package/freifunk-watchdog: add sysupgrade hook to terminate ffwatchd before system upgrade

This commit is contained in:
Jo-Philipp Wich 2009-05-13 00:44:27 +00:00
parent 2399dafe57
commit 81a3c7b2d2
2 changed files with 9 additions and 0 deletions

View 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))

View file

@ -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"