Can insserv and startpar give priority to some scripts to start them earlier?

Dr. Werner Fink werner at suse.de
Thu Oct 8 09:21:56 UTC 2009


On Wed, Oct 07, 2009 at 03:29:20PM +0200, Petter Reinholdtsen wrote:
> 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.

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



More information about the initscripts-ng-devel mailing list