[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LP for rc (udpated)



On Sun, 1 Jul 2001, [iso-8859-1] Gerardo Santana Gómez Garrido wrote:

One caveat. I'm looking at a machine running 2.9-stable, upgraded
from 2.8-stable.

> b) I was surprised when I found an rc file that sometimes it checks for
> existing executable files, but sometimes not;

I'm can't say about the few times it checks daemons via -x.
But it occurs to me that, if a given daemon doesn't exist, then
the attempt to start it up will generated an error, indicating that
the daemon doesn't exist or isn't executable. If that's the case for
something you expect to be there and start up, you want it reported.
Adding the test, IMHO, doesn't gain you anything. I don't know why
there's a -f test for ldconfig.

> sometimes it checks for readable files, and sometimes just for existance;

`grep -- -r /etc/rc` gets me three `rm -rf`s and one `pax -rw`.
Do do you have an example that I'm missing? That aside, checking for
read/write access doesn't mean much when you're running as root.

> sometimes uses full paths for commands, and sometimes not.

PATH gets defined:
PATH=/sbin:/bin:/usr/sbin:/usr/bin
export PATH

Checking for size greater than zero (-s rather than -f) also, I think,
doesn't gain anything. A daemon should either read the empty config
file and do nothing, or complain about a 0-byte config.
+------------------------------------------------------------------------+
| Dave Taira <bodhi@hagakure.org>                2001.07.01/20:37:50 PDT |
| Morlock for Hire                                                       |
+------------------------------------------------------------------------+
| Children have a right to be protected from idiots disguising their     |
| personal biases as the best interests of something helpless such as    |
| children.                                                     --Andr00 |
+------------------------------------------------------------------------+