[Pkg-sysvinit-devel] Bug#738775: insserv: Insserv 1.16 tries to connect to systemd even though system is running on sysv-init
Petter Reinholdtsen
pere at hungry.com
Wed Feb 12 22:04:11 UTC 2014
[Jan Binder]
>> I do not have systemd installed. Perhaps installing it is enough
>> to confuse insserv to expect it to be running?
> That might be enough.
I found the trigger:
root at mybox:~# strace -o /tmp/foo insserv
root at mybox:~# grep systemd /tmp/foo
access("/bin/systemd", F_OK) = -1 ENOENT (No such file or directory)
root at mybox:~# touch /bin/systemd
root at mybox:~# insserv
insserv: can not connect systemd: Failed to connect to socket /run/systemd/private: No such file or directory
process 5436: arguments to dbus_connection_close() were incorrect, assertion "connection != NULL" failed in file ../../dbus/dbus-connection.c line 2907.
This is normally a bug in some application using the D-Bus library.
process 5436: arguments to dbus_connection_unref() were incorrect, assertion "connection != NULL" failed in file ../../dbus/dbus-connection.c line 2794.
This is normally a bug in some application using the D-Bus library.
root at mybox:~#
So if /bin/systemd exist, insserv change behaviour and fail if it
can't talk to systemd. Will have to come up with a different
detection mechanism. Anyone got any ideas? This is the current code:
/*
* Systemd support
*/
if (access(SYSTEMD_BINARY_PATH, F_OK) == 0 && (sbus = systemd_open_conn())) {
for (c = 0; c < argc; c++)
forward_to_systemd (argv[c], del ? "disable": "enable", path != ipath);
(void)systemd_get_tree(sbus);
systemd_close_conn(sbus);
systemd = true;
}
Heh, a nasty way to work around this problem would be to conflict with
systemd. :) Not a sustainable option, thought. :/
--
Happy hacking
Petter Reinholdtsen
More information about the Pkg-sysvinit-devel
mailing list