Slashdot/IBM: How To Speed Up Linux Booting
erich.schubert at gmail.com
Wed Apr 11 11:42:41 UTC 2007
> I also don't think it will be possible to translate existing
> initscript (shell scripts) in an automated fashion into upstart jobs
> or initng ifiles. Shell syntax is simply to complex
Not automatically, that is. However it might be possible to convert them with
human effort, such as on a hackfest.
init scripts do a couple of things, e.g.:
- starting (as in 'start and quit')
- stopping (as in 'stop and quit')
- running a service (not in sysv, but monitoring inits need that)
- preparing a service (e.g. updating the postfix chroot)
- configuring system parameters (e.g. network setup)
- loading some configuration options
and by making these 'separated' we can maybe generate init scripts for
different init systems a bit easier. We also don't have to cover 100%,
if we can generate 90% of init scripts this way, that is already very
useful. There will always be exceptions where it doesn't work.
> ml last year) and introducing an new package, let's call it "initcore"
> for now, which provides the core infrastructure, like
> update-rc.d/invoke-rc.d, and make that package essential.
Agreed. This can be done anytime, since it doesn't really require
other init systems to be available at all. A similar thing is IMHO
needed for cron, where the 'standard' cron jobs should be moved out of
the package (so they can easily be replaced e.g. with standard
cronjobs better suited for SELinux)
> As a next step we should scan existing dpkg maintainer scripts/init
> scripts and logrotate files and check if they use invoke-rc.d properly
> or call /etc/init.d/$scripts directly and file bugs against these
Lintian does that already, so this list already exists.
Another thing we could start right now is filing these bugs.
> We will need this so replacement init systems can divert
I already explained somewhere that diverting is not an option for init.
You want to be able to switch init systems on a running system; diversions take
immediate effect, not on the next reboot. Diverting invoke-rc.d might
render your system
unable to do a proper shutdown.
Instead, these scripts should do an autodetection of the current init
system and then
call the appropriate real invoke-rc.d instead.
erich@(mucl.de|debian.org) -- GPG Key ID: 4B3A135C (o_
To understand recursion you first need to understand recursion. //\
Wo befreundete Wege zusammenlaufen, da sieht die ganze Welt für V_/_
eine Stunde wie eine Heimat aus. --- Herrmann Hesse
More information about the initscripts-ng-devel