Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#12010 closed defect (fixed)

Make bootscript headers consistent so that install-initd can be used on them

Reported by: Pierre Labastie Owned by: DJ Lucas
Priority: normal Milestone: 9.1
Component: Bootscripts Version: SVN
Severity: normal Keywords:


The LSB headers for our bootscripts are not consistent:

  • some Default-Start in level 2 depend on things started in level 3
  • some Require-Stop depend on scripts without a stop switch

See and reply.

Change History (11)

comment:1 by Pierre Labastie, 4 years ago


  • remove 2 from any Default-Start, which does not have 1, and add it to Default-Stop
  • remove any script started in S from Required-Stop or Should-Stop for scripts started in non S
  • Discuss what should really depend on nfs-mounts (I'm not sure the answer is "nothing")

But I am not an expert.

comment:2 by Tim Tassonis, 4 years ago

I think the answer is acually "nothing" regarding $remote_fs. I think this crept in due to some esoteric setup where important files were on an nfs mount.

If this is the case, the sysadmin has to define the dependency himself, or else blfs would have to define a requiered dependency on nfs-tools for every service that $remote_fs is required.

Hard dependencies really should only be defined in the script if the service cannot work without it.

comment:3 by Bruce Dubbs, 4 years ago

The boot scripts we are using in BLFS have been around for a long time. Most have not been touched in six or seven years, but they have been around since 2004. DJ was one of the original authors, but I did a lot of updating around 2012.

It looks like DJ initially added the LSB headers in 2011. I don't personally use them because the logic is embedded in the bootscripts Makefile.

A couple of observations:

Levels 3, 4, and 5 should be identical except for the DM entries. We currently have bootscripts for sddm, lxdm, gdm, and lightdm, although we archived sddm in BLFS some time ago.

Looking at the headers, the only script that Provides a capability that starts with a $ is netfs ($remote_fs), and that essentially does '/bin/mount -a -O _netdev'. That requires manually editing fstab to have an entry option as _netdev. That explanation is in the book for nfs-utils and sshfs, although it could be added to samba.

Levels 0 and 6 should be identical except for S99halt for level 0 and S99reboot for level 6.

Nothing gets started in level 1. It just stops everything that might have been started in levels 2-5. The only thing left running is those scripts started in runlevel S.

The only thing that needs to be addressed in runlevel S in the other levels is S40mountfs. Then only in levels 0 and 6 when shutting down or rebooting.

Personally I do not recall ever needing to run levels 1, 2, or 4. I only use level 5 for testing a DM.

One last thing. It's not described in the book very well, but there is a capability to step through the bootscripts and run them one at a time, in order, skipping those not wanted. It is a debugging capability, but setting IPROMPT="yes" in /etc/sysconfig/ gives the user 3 (can be changed) seconds to select interactive mode for running the boot scripts. This is LFS specific. There are a few other tweaks in the file that some may find interesting.

comment:4 by Douglas R. Reno, 4 years ago

DJ, you might want to have a look at this.

comment:5 by Bruce Dubbs, 4 years ago

Milestone: 8.59.0

Milestone renamed

comment:6 by DJ Lucas, 4 years ago

Owner: changed from blfs-book to DJ Lucas
Status: newassigned

comment:7 by DJ Lucas, 4 years ago

Summary: Make bootscript headers consistent so that initd can be used on themMake bootscript headers consistent so that install-initd can be used on them

comment:8 by DJ Lucas, 4 years ago

Milestone: 9.09.1

There is a problem with the existing tools WRT the dm scripts in runlevel 5. I wound up writing a comparison tool in Python, and then went ahead and finished it up to make a full replacement. I've extended it with $first and $last facilities (these should be obvious). The tools are located at As of v0.3, they should be production ready but I don't want to introduce them until after release. In addition to the install_initd and remove_initd tools, it includes lsb_release, and eventually will include an lsbinstall utility.

comment:9 by DJ Lucas, 4 years ago

First part of fix is in r22081.

comment:10 by DJ Lucas, 4 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r22112.

comment:11 by DJ Lucas, 4 years ago

Actually fixed in r22113.

Note: See TracTickets for help on using tickets.