From 19866a14c029bec88af179524a116e8333cdc67e Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sun, 13 Dec 2009 21:33:28 +0100 Subject: [PATCH] collectd-core.collectd.init.d: Do not start collectd if there is no config. Else, installation of "collectd-core" (which does not provide configuration) would fail. --- debian/changelog | 6 +++++- debian/collectd-core.collectd.init.d | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 107656d..1517bc2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,8 +6,12 @@ collectd (4.8.1-3) unstable; urgency=low (e.g. providing customizations on top of "collectd-core" without modifying the "collectd" package) and, amongst others, removes the hard dependency on librrd (Closes: #495936, #544311). + * debian/collectd-core.collectd.init.d: + - Do not (try to) start collectd if the config file does not exist. Else, + installation of "collectd-core" (which does not provide configuration) + would fail. - -- Sebastian Harl Sun, 13 Dec 2009 20:54:52 +0100 + -- Sebastian Harl Sun, 13 Dec 2009 21:30:38 +0100 collectd (4.8.1-2) unstable; urgency=low diff --git a/debian/collectd-core.collectd.init.d b/debian/collectd-core.collectd.init.d index 5e8d29e..d66df6d 100755 --- a/debian/collectd-core.collectd.init.d +++ b/debian/collectd-core.collectd.init.d @@ -49,6 +49,11 @@ if test "$DISABLE" != 0 -a "$1" == "start"; then exit 0 fi +if ! test -e "$CONFIGFILE"; then + echo "Not starting $NAME - no configuration ($CONFIGFILE) found." + exit 0 +fi + if test "$ENABLE_COREFILES" == 1; then ulimit -c unlimited fi -- 2.30.2