[1c48007] | 1 | LSB-V3 README
|
---|
| 2 |
|
---|
| 3 | The scripts contianed in this directory are a complete rewrite of the
|
---|
[010d108] | 4 | boot scripts from LFS-6.1 (updated for LFS-SVN about 2008-05-31). As is
|
---|
[1c48007] | 5 | usually the case with a rewrite, there have been many changes:
|
---|
| 6 |
|
---|
| 7 | LSB Version 3.1 Compliant Scripts - Immediately noticable are the LSB headers
|
---|
| 8 | in the rc.d scripts themselves. Each script contains a usable header to
|
---|
| 9 | allow for automating both the installation of, and determining proper
|
---|
| 10 | execution order for the startup scripts. These values can also be used
|
---|
| 11 | directly in parallel boot setups. Additionally, messages are displayed in
|
---|
| 12 | one single write to the screen, after exit status is determined, so that
|
---|
| 13 | they can be used in parallel setups. I am not sure if this was the only
|
---|
| 14 | barrier to auto language translation in the previous bootscripts. Further,
|
---|
| 15 | the messages are created from parts and only written to the screen in a
|
---|
| 16 | single command, so maybe no help at all WRT translated boot messages.
|
---|
| 17 |
|
---|
| 18 | LSB 3.1 Omissions - Unfortunately, this package is not completely LSB
|
---|
[010d108] | 19 | compliant as it lacks install_initd and remove_initd programs. The current
|
---|
[1c48007] | 20 | popular flavor of these programs is written in Python, which, as you should
|
---|
| 21 | know, is not installed until BLFS. I began work on a bash implementation,
|
---|
| 22 | and have provided the needed functions to parse the LSB headers in the
|
---|
| 23 | manage-functions script (insalled by default into /lib/lsb). Unfortunately,
|
---|
[010d108] | 24 | I have yet to complete the actual install_initd and remove_initd scripts,
|
---|
| 25 | and have found bash to an unsuitable language to write a complete reorder
|
---|
| 26 | due to the ammount of time for recursive funtions and loops to complete.
|
---|
| 27 | Dan Nicholson has began work on initd-tools, a C implementaion of
|
---|
| 28 | install_initd and remove_initd. At the time of writing (20080830) the
|
---|
| 29 | programs themselves are not yet functional, however, the libraries used
|
---|
| 30 | to parse the scripts and provide the dependency order are working as
|
---|
| 31 | expected. I would expect a completely standards compliant set of programs,
|
---|
| 32 | written in C very soon. Dans work can be viewed via git-web at
|
---|
| 33 | http://gitweb.dwcab.com/?p=initd-tools.git;a=summary .
|
---|
[1c48007] | 34 |
|
---|
| 35 | Distribution Independent - this original goal for the LFS scripts has been
|
---|
| 36 | stretched even further by providing both a global rc config file that
|
---|
| 37 | contains (generally) static values, and a new rc.site config file to allow
|
---|
| 38 | customization of messages as diplayed to the end user during the boot
|
---|
| 39 | process. The format of messages printed to the screen is adjustable
|
---|
| 40 | here. As well, the other options that were available in the previous
|
---|
| 41 | versions of the lfs-bootscripts, and additional options as discussed below,
|
---|
| 42 | are configurable by the /etc/sysconfig/rc.site file.
|
---|
| 43 |
|
---|
| 44 | Single Environment - The rc script has been rewritten completely to allow a
|
---|
| 45 | single source of the boot configuration per runlevel change. This config
|
---|
| 46 | is inherited from rc's environment as opposed to being sourced everytime a
|
---|
| 47 | script is run. This results in a negledgable decrease in boot time, but
|
---|
| 48 | it is just better in principle.
|
---|
| 49 |
|
---|
| 50 | Boot Logging - The previous incarnation of the boot log didn't begin
|
---|
| 51 | recording events until the root filesystem was mounted read/write. This has
|
---|
| 52 | been corrected by providing a tempfs mount immediately after init hands
|
---|
| 53 | control to the rc script. The bootlog is generated on the tempfs and then
|
---|
| 54 | passed to the log file before login. Additionally, shutdown events are no
|
---|
| 55 | longer recorded in the bootlog. They were pretty much useless and it really
|
---|
| 56 | wasn't what I'd call a *boot* log. Boot logging is on by default and is
|
---|
| 57 | configurable in the /etc/sysconfig/rc.site file.
|
---|
| 58 |
|
---|
| 59 | Interactive Boot - This feature has been included by default, and is a
|
---|
| 60 | little more polished than my previous attempt. It does introduce a two
|
---|
| 61 | second delay in the boot process (so that you have time to press a button
|
---|
| 62 | to select interactive mode). This time value, and the option prompt itself,
|
---|
| 63 | is configurable in the /etc/sysconfig/rc.site file.
|
---|
| 64 |
|
---|
[010d108] | 65 | Path changes - The base directory for the bootscripts is now /etc, not
|
---|
[1c48007] | 66 | /etc/rc.d. This is mostly to conform with mainstream distros, but other
|
---|
| 67 | boot methods do expect that /etc/init.d is the location of bootscripts.
|
---|
| 68 | Some distros provide a rc.d direcorty with symlinks to the rc*.d and init.d
|
---|
| 69 | directories, I have not done that. /etc is the location now, get your
|
---|
| 70 | flying fingers accustomed to it! Of course, this is still configurable in
|
---|
| 71 | /etc/sysconfig/rc.site, and if the change is too great, I'll put it back.
|
---|
[010d108] | 72 | I've also removed the rcsysinit.d and replaced it with rcS.d.
|
---|
[1c48007] | 73 |
|
---|
| 74 | LSB Functions - The previous lfs-bootscripts sourced a functions file
|
---|
| 75 | located at /etc/rc.d/init.d/functions. This file has been renamed
|
---|
| 76 | $distro-functions to segregate it from the old. The name is configurable
|
---|
[010d108] | 77 | by the rc.site configuration file. LSB defined functions are used where
|
---|
| 78 | possible, but the $distro-functions file provides, easy to use wraper
|
---|
| 79 | functions that start/stop/reload/force-reload/restart programs, evaluate
|
---|
| 80 | the numerical LSB return values, and print status messages to the screen.
|
---|
| 81 | Both LFS functions and LSB functions are documented directly in the scritps
|
---|
| 82 | located at /etc/init.d/$distro-functions and /lib/lsb/init-functions
|
---|
| 83 | respectively.
|
---|
[1c48007] | 84 |
|
---|
| 85 | Pretier - Yeah, I just couldn't handle all the grey text... By default,
|
---|
| 86 | successful boot messages are prefixed with a single green astrik character,
|
---|
| 87 | warning messages with two yellow astirks, and failures are prefixed with
|
---|
| 88 | three red astriks. This just provides a second 'quick glance' status when
|
---|
| 89 | watching the boot messages fly by. Again, the prefixes are configurable (or
|
---|
| 90 | completely removable) in the /etc/sysconfig/rc.site file.
|
---|
| 91 |
|
---|
| 92 | Complete Rewrite - Yep. That doesn't mean that code wasn't reused when
|
---|
| 93 | possible, so Alexander, Bryan, Dan, Gerard, Jeremy, Jim, Mathias, Matthew,
|
---|
| 94 | Nathan, and countless other contributors (whose names I've forgotten and will
|
---|
| 95 | promptly be reminded of (please)) are due credit for these as well. That
|
---|
| 96 | said, at very least, this is a complete reorganisation that I've tested to
|
---|
| 97 | the best of my ability, but there probably are some hidden bugs that will
|
---|
| 98 | come to lite when used more frequently. Please give me a shout _when_ you
|
---|
| 99 | find them.
|
---|
| 100 |
|
---|
| 101 | Thanks.
|
---|
| 102 |
|
---|
| 103 | -- DJ Lucas
|
---|
| 104 | dj@linuxfromscratch.org
|
---|
| 105 |
|
---|