From: ssm Date: Mon, 10 Mar 2008 07:46:37 +0000 (+0000) Subject: Debian packaging: Fix syntax error in varnishlog init script, and set correct variabl... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=108abd707de05c6294517bbf1957690bd77a428c;p=varnish Debian packaging: Fix syntax error in varnishlog init script, and set correct variable in defaults file. Add clarifying comment for variable git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2586 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/debian/varnish.default b/varnish-cache/debian/varnish.default index 69164982..def42991 100644 --- a/varnish-cache/debian/varnish.default +++ b/varnish-cache/debian/varnish.default @@ -17,8 +17,9 @@ MEMLOCK=82000 INSTANCE=$(uname -n) # Uncomment this to enable varnishlog. Please make sure you have -# enough disk space for significant amounts of log data. -# VARNISHLOG_ENABLE=1 +# enough disk space for significant amounts of log data. To disable +# varnishlog, set the variable to "0", "no", or leave it unset. +# VARNISHLOG_ENABLED=1 # This file contains 4 alternatives, please use only one. diff --git a/varnish-cache/debian/varnish.varnishlog.init b/varnish-cache/debian/varnish.varnishlog.init index ba02a630..7558c5c9 100755 --- a/varnish-cache/debian/varnish.varnishlog.init +++ b/varnish-cache/debian/varnish.varnishlog.init @@ -27,8 +27,9 @@ if [ -f /etc/default/varnish ] ; then . /etc/default/varnish fi -# If unset or not 1, exit -if [ -z "${VARNISHLOG_ENABLED}" -o "${VARNISHLOG_ENABLED}" -ne "1" ]; then +# If unset, or set to "0" or "no", exit +if [ -z "${VARNISHLOG_ENABLED}" -o "${VARNISHLOG_ENABLED}" == "0" \ + -o "${VARNISHLOG_ENABLED}" == "no" ]; then exit 0; fi