Don't parse Red Hat style chkconfig headers if chkconfig support is disabled via --disable-chkconfig.
-- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
From 9abb1aed85193ca81e697334d10b36693595b648 Mon Sep 17 00:00:00 2001 From: Michael Biebl <[email protected]> Date: Mon, 24 Mar 2014 13:55:23 +0100 Subject: [PATCH] core: make parsing of chkconfig headers conditional Don't parse Red Hat style chkconfig headers if chkconfig support is disabled via --disable-chkconfig. --- src/core/service.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/service.c b/src/core/service.c index 78a2e06..7642bfb 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -644,6 +644,7 @@ static int service_load_sysv_path(Service *s, const char *path) { t++; t += strspn(t, WHITESPACE); +#ifdef HAVE_CHKCONFIG if (state == NORMAL) { /* Try to parse Red Hat style chkconfig headers */ @@ -764,7 +765,9 @@ static int service_load_sysv_path(Service *s, const char *path) { chkconfig_description = d; } - } else if (state == LSB || state == LSB_DESCRIPTION) { + } else +#endif + if (state == LSB || state == LSB_DESCRIPTION) { if (startswith_no_case(t, "Provides:")) { char *i, *w; @@ -964,8 +967,10 @@ static int service_load_sysv_path(Service *s, const char *path) { if (short_description) description = short_description; +#ifdef HAVE_CHKCONFIG else if (chkconfig_description) description = chkconfig_description; +#endif else if (long_description) description = long_description; else -- 1.9.1
_______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
