Small improvement of rc script makes big difference (bug report 35898)

Simon Perreault nomis80 at
Tue Aug 1 06:49:49 PDT 2000

> Ok how does a script fail then? A script is just a text file that has a
> bunch of commands that are executed in order. If a script fails it means
> bash fails. A script won't fail if the commands won't fail. In my eyes a
> script only fails when a command in that script fails, and those
> failures are already detected. What more can be detected.

A countless number of unforeseen possible cases where the script itself will
fail. For example: there is a /var/run/*.pid that prevents a program from
running. A typo in the script. Trying to run a command that isn't in the
path at boot time. There will allways be unforeseen cases, and we can't
prevent them all (in theory yes, but not in practice).

> If sysklogd echo's a failure (invalid usage or whatever will be added),
> the rc echo lines will *not* be shown, since sysklogd's echo lines
> already tell you why the error occured and now to fix it.


> If I coded sysklogd and functions properly, sysklogd will not exit with
> an error 1. If, however, it does, rc will trap it and print an error
> (sicne when sysklogd traps an error the retval is reset to 0) saying
> "unknown error in script $i blah blah try to fix with blah blah"


> I guess I find it hard to explain this one, it's more in my head than I
> can express.

Me too :). But I guess you finally got my point. The last two paragraph
describe exactly the purpose of the rc modification.

Mail archive:
IRC access: server: port: 6667 channel: #LFS
Unsubscribe: email lfs-discuss-request at and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)

More information about the lfs-dev mailing list