[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sysvinit-devel] Why is insserver 1.16.0 producing the wrong script
From: |
Petter Reinholdtsen |
Subject: |
Re: [sysvinit-devel] Why is insserver 1.16.0 producing the wrong script ordering? |
Date: |
Sat, 8 Feb 2014 22:37:01 +0100 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
[Petter Reinholdtsen]
> Anyone got a clue what is going on?
I got a clue. I had forgotten the SUSE setup, where every script have
both stop and start symlinks. The real problem I had was that the
code to insert default settings in the non-SUSE case was broken. This
patch solved the issue. Ok to commit?
Index: insserv/insserv.c
===================================================================
--- insserv.orig/insserv.c 2014-02-08 21:54:22.265290998 +0100
+++ insserv/insserv.c 2014-02-08 22:20:09.046218370 +0100
@@ -3259,11 +3259,14 @@
#endif /* SUSE */
#ifndef SUSE
- if (!lsb) {
- script_inf.required_start = xstrdup(DEFAULT_DEPENDENCY);
- script_inf.required_stop = xstrdup(DEFAULT_DEPENDENCY);
- script_inf.default_start = xstrdup(DEFAULT_START_LVL);
- script_inf.default_stop = xstrdup(DEFAULT_STOP_LVL);
+ if ((lsb & FOUND_LSB_HEADER) == 0) {
+ if (lsb & FOUND_LSB_DEFAULT) {
+ warn("Missing LSB header and overrides, inserting default
runlevel(s) and dependencies\n");
+ script_inf.required_start = xstrdup(DEFAULT_DEPENDENCY);
+ script_inf.required_stop = xstrdup(DEFAULT_DEPENDENCY);
+ script_inf.default_start = xstrdup(DEFAULT_START_LVL);
+ script_inf.default_stop = xstrdup(DEFAULT_STOP_LVL);
+ }
}
#endif /* not SUSE */
--
Happy hacking
Petter Reinholdtsen