Revision: 7441
http://sourceforge.net/p/ipcop/svn/7441
Author: owes
Date: 2014-04-08 19:06:46 +0000 (Tue, 08 Apr 2014)
Log Message:
-----------
Make the 'halt fcron' mechanism default. On smaller boxes an update can run for
longer time, and we do not want any fcron jobs to interfer.
Modified Paths:
--------------
ipcop/trunk/updates/template/setup
Modified: ipcop/trunk/updates/template/setup
===================================================================
--- ipcop/trunk/updates/template/setup 2014-04-08 19:04:24 UTC (rev 7440)
+++ ipcop/trunk/updates/template/setup 2014-04-08 19:06:46 UTC (rev 7441)
@@ -27,6 +27,22 @@
exit 1
fi
+# Stop fcron, to keep tasks from running during update
+FCRONPID=`cat /var/run/fcron.pid`
+/bin/kill $FCRONPID
+COUNT=30
+
+while [ -e /var/run/fcron.pid -a ${COUNT} -ge 0 ]
+do
+ sleep 1
+ COUNT=$(( ${COUNT} - 1 ))
+done
+
+if [ -e /var/run/fcron.pid ]; then
+ msg "kill fron, still running after 30 seconds"
+ /bin/kill -KILL $FCRONPID
+fi
+
#####
#
# Add version specific handling *before* unpacking the patch here.
@@ -75,13 +91,19 @@
#####
-
#####
#
# End of version specific handling. Continue with universal stuff.
#
#####
+# Restart fcron
+if [ -e /etc/FLASH ]; then
+ /usr/sbin/fcron -s 86400
+else
+ /usr/sbin/fcron
+fi
+
# Patch general-functions.pl
/bin/sed -i -e "s+^\(\$General::version\s*=\s*\).*+\1'$UPGRADEVERSION';+"
/usr/lib/ipcop/general-functions.pl
# Patch /etc/issue
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Ipcop-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipcop-svn