On Fri, Feb 03, 2012 at 07:22:45AM +0100, Sylvain wrote: > Hello, > > I have a setup in which the slim display manager logs in > automatically and then starts a program (thanks to the .xinitrc > file). This program needs dbus to work correctly and at the moment > it crashes every time it's launched because dbus is not yet started > (slim starts in runlevel 3). > > I was told about using insserv overrides but I can't find any good > documentation on this, even the manpage is quite vague about the > format the override file should have. So I put this in a > /etc/insserv/overrides/slim file: > First of all, check that the name of this file is correct. Insserv will look for an override based on the name of the file it runs, not based on any links thereto. (This caught me out once. A third party program installed its own init scripts and made a symlink in /etc/init.d/ with a different name). This shouldn't be a problem for slim, though. > >#!/bin/sh > > > >### BEGIN INIT INFO > ># Provides: slim > ># Required-Start: $local_fs $remote_fs dbus > ># Required-Stop: $local_fs $remote_fs > ># Should-Start: xfs $named slapd > ># Should-Stop: xfs $named slapd > ># Default-Start: 2 3 4 5 > ># Default-Stop: 0 1 6 > ># Short-Description: Start/stop the SLiM daemon. > >### END INIT INFO > > I'm not sure if I should repeat the whole LSB headers or only the > one I want to change (in this case Required-Start). In all cases, > this doesn't work since dbus is still not started when the program > that depends on it starts. Am I missing something? Should I run an > insserv command to take the override file into account? How can I > check that the override file is used? I'm not sure that the shebang (#!/bin/sh) is needed; try removing the first two lines of the script. Next, run: # insserv -v -n -d 2>&1|$PAGER and look for lines such as: insserv: Loading /etc/insserv/overrides/slim After many "Loading lines", you'll either get no more information (your initscripts are ordered as per the header comments) or a series of "remove service"/"enable service" lines which tell you what insserv wants to do to re-order your scripts. If you're happy with what it wants to do, re-run the insserv command without "-n". -- Darac Marjal
Attachment:
signature.asc
Description: Digital signature