Discussion:
Can insserv and startpar give priority to some scripts to start them earlier?
Petter Reinholdtsen
2009-10-07 13:29:20 UTC
Permalink
One feature that might be good to have, is to be able to start
gdm/kdm/xdm/wdm/etc as soon as possible during boot, and everything
else after these scripts have started. Is it possible to get insserv
to generate such sequence?

I would like to specify to inssert to give priority to kdm, and
everything not needed to start kdm should get a sequence number after
kdm.

How hard would it be to implement in insserv? The list of priority
facilities would have to be fetched from a configuration file, or
perhaps from the init.d scripts themselves (like X-Interactive).

I guess I would end up with something like this in rc2.d/:

S01rsyslog
S02acpid
S02dbus
S03hal
S04network-manager
S05kdm
S06... the rest ...

A similar feature would be nice for startpar, to get kdm started
earlier during boot.

Happy hacking,
--
Petter Reinholdtsen
Dr. Werner Fink
2009-10-08 09:21:56 UTC
Permalink
Post by Petter Reinholdtsen
One feature that might be good to have, is to be able to start
gdm/kdm/xdm/wdm/etc as soon as possible during boot, and everything
else after these scripts have started. Is it possible to get insserv
to generate such sequence?
I would like to specify to inssert to give priority to kdm, and
everything not needed to start kdm should get a sequence number after
kdm.
How hard would it be to implement in insserv? The list of priority
facilities would have to be fetched from a configuration file, or
perhaps from the init.d scripts themselves (like X-Interactive).
S01rsyslog
S02acpid
S02dbus
S03hal
S04network-manager
S05kdm
S06... the rest ...
A similar feature would be nice for startpar, to get kdm started
earlier during boot.
On openSuSE we use for xdm (also used for kdm and gdm) and syslog
further scripts called earlysyslog and earlyxdm. Those scripts
simply do some checks e.g. for syslog if network is required and if
yes earlysyslog does nothing but if no, call syslog script and set
a lock that syslog is alreday done. The same with earlyxdm,
beside if network is required it checks also if there are e.g.
home partitions located on NFS shares. If not call the xdm script
and set a lock that it is already done.

Currently I do not see how to implement such dynamic depencies
mainly into startpar. The only way would be that such scripts
self include their check and those can be executed by using
the argument `early', beside `start', `stop', `restart' ... then
startpar could have a look. Neverthless such scripts must be
marked as e.g. X-Early-Start and X-Early-Stop with the dpendencies
not expanded by insserv but by startpar as those are dynamically
and not static (Otherwise e.g. change in the syslog configuration
or adding NFS shares would require to run insserv).


Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
Petter Reinholdtsen
2009-10-08 12:19:23 UTC
Permalink
[Stephan Kulow]
And these scripts have an higher importance for startpar, "early" is
an hardcoded prefix - and startpar will prefer the subtree reaching
them. This works fairly well.
Aha, did not know this. Sound like a feature to use when we change to
concurrent booting in Debian by default in Debian. The quality of the
init.d script dependencies are not yet high enough to enable it by
default. Tested this, and renaming kdm to earlykdm worked like a
charm, but I would like to avoid magic names to enable this
feature. :)

For now, we use static sequence generated by insserv by default, and I
would love insserv to have a similar feature when generating the
sequence.

Happy hacking,
--
Petter Reinholdtsen
Stephan Kulow
2009-10-08 11:56:13 UTC
Permalink
Post by Dr. Werner Fink
Post by Petter Reinholdtsen
One feature that might be good to have, is to be able to start
gdm/kdm/xdm/wdm/etc as soon as possible during boot, and everything
else after these scripts have started. Is it possible to get insserv
to generate such sequence?
I would like to specify to inssert to give priority to kdm, and
everything not needed to start kdm should get a sequence number after
kdm.
How hard would it be to implement in insserv? The list of priority
facilities would have to be fetched from a configuration file, or
perhaps from the init.d scripts themselves (like X-Interactive).
S01rsyslog
S02acpid
S02dbus
S03hal
S04network-manager
S05kdm
S06... the rest ...
A similar feature would be nice for startpar, to get kdm started
earlier during boot.
On openSuSE we use for xdm (also used for kdm and gdm) and syslog
further scripts called earlysyslog and earlyxdm. Those scripts
And these scripts have an higher importance for startpar, "early" is an
hardcoded prefix - and startpar will prefer the subtree reaching them.
This works fairly well.

Greetings, Stephan

Loading...