[Pkg-sysvinit-devel] Bug#849284: insserv: fopen(/etc/insserv.conf): No such file or directory
Petter Reinholdtsen
pere at hungry.com
Wed Dec 28 10:21:32 UTC 2016
Control: reassign -1 init-system-helpers
Control: found -1 1.46
[積丹尼 Dan Jacobson]
> We see the problem only occurs between the time insserv has been
> unpacked, and when it is finally set up.
Right. The I suspect the problem is in update-rc.d from
init-system-helpers, using the existence of insserv to decide if it
should be used, while it should look for both insserv in PATH and
/etc/insserv.conf before using it. This was not really a problem when
insserv was installed by debootstrap, but installing it later with lots
of other packages will expose it.
I suspect something like this will solve it (untested patch):
--- /usr/sbin/update-rc.d 2016-11-06 20:02:00.000000000 +0000
+++ /tmp/update-rc.d 2016-12-28 10:19:23.698799110 +0000
@@ -241,7 +241,7 @@
$insserv = "/sbin/insserv" if ( -x "/sbin/insserv");
if ("remove" eq $action) {
system("rc-update", "-qqa", "delete", $scriptname) if ( -x "/sbin/openrc" );
- if ( ! -x $insserv) {
+ if ( ! -x $insserv || ! -e "/etc/insserv.conf") {
# We are either under systemd or in a chroot where the link priorities don't matter
make_sysv_links($scriptname, "remove");
systemd_reload;
@@ -275,7 +275,7 @@
cmp_args_with_defaults($scriptname, $action, @args);
}
- if ( ! -x $insserv) {
+ if ( ! -x $insserv || ! -e "/etc/insserv.conf") {
# We are either under systemd or in a chroot where the link priorities don't matter
make_sysv_links($scriptname, "defaults");
systemd_reload;
@@ -311,7 +311,7 @@
sysv_toggle($notreally, $action, $scriptname, @args);
- if ( ! -x $insserv) {
+ if ( ! -x $insserv || ! -e "/etc/insserv.conf") {
# We are either under systemd or in a chroot where the link priorities don't matter
systemd_reload;
exit 0;
Reassigning.
--
Happy hacking
Petter Reinholdtsen
More information about the Pkg-sysvinit-devel
mailing list