packages: varnish/varnish.init - discard vcl config in test only if it load...
glen
glen at pld-linux.org
Mon Jan 25 23:44:32 CET 2010
Author: glen Date: Mon Jan 25 22:44:32 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- discard vcl config in test only if it loaded ok
---- Files affected:
packages/varnish:
varnish.init (1.14 -> 1.15)
---- Diffs:
================================================================
Index: packages/varnish/varnish.init
diff -u packages/varnish/varnish.init:1.14 packages/varnish/varnish.init:1.15
--- packages/varnish/varnish.init:1.14 Fri Jan 8 12:16:33 2010
+++ packages/varnish/varnish.init Mon Jan 25 23:44:27 2010
@@ -54,9 +54,11 @@
# output is discarded if checkconfig is ran without details
configtest() {
local rc=0
+
if [ -f /var/lock/subsys/varnish ]; then
vcl_load $vcl_label ${VARNISH_VCL_CONF}; rc=$?
- vcl_discard $vcl_label
+ # discard only if above succeeded
+ [ $rc = 0 ] && vcl_discard $vcl_label || rc=$?
else
echo "Varnish is not running, config cannot be tested"
fi
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/varnish/varnish.init?r1=1.14&r2=1.15&f=u
More information about the pld-cvs-commit
mailing list