Erik Troan <[EMAIL PROTECTED]> writes: > On Wed, 3 Oct 2001, Charles Curley wrote: > >> Memo to Red Hat Engineering: The initialization code has gotten so >> complicated and so confusing that I have given up trying to understand >> it. Please simplify it to that we mere mortal paying customers (you >> know, the folks who pay your salary) can understand and use it. Or >> document it, however heretical the notion may be. Or both. > > Intialization is definitely complicated, and getting more so. The proliferation > of devices and filesystems makes this prety much unavoidable. > > However, if you could tell us what parts you're finding hard to understand > you could probably get some quick help.
Peanut Gallery = Non-paying customer (user who buys offical redhat releases but no service) A comment from the peanut gallery: One thing that would help would be to heavily comment all init scripts. Maybe this isn't done because they change frequently or maybe it is just assumed that any one paging thru them will be able to follow the code easily, which is absolutely wrong in my opinion. Here is some data that might paint the picture a little bit. In my setup there are 592 lines in the scripts in /etc/init.d that begin with a `#' many of these are Author or script names or other non-explanatory comments. Not sure how many, but a rough guess might be around 139 (Obtained by subtracting lines containing: Shebang nothing after the # accreditation (author names)) Leaving 453 out of a total number of lines: grep -r '^' .|wc -l 4271 These figures are clearly not terribly accurate but do reflect some idea. It gives something like 10 Percent usefull comments. Which is probably a generous guess. Admittedly I am a rank amateur script writer but I usually have 40 percent or more comments in scripts that I expect to come back to at some future date. And still sometimes have trouble seeing what I was trying to do. If that sounds like too many for easy reading, one can always flush the comments with `:g/^#/d' (in vim) to ease reading. I'm sure it is very `unixy' and clever to use as little comment as possible but it means rough sledding for anyone trying to follow the action. Here is sort of common example from /etc/init.d/functions: [...] # Get a sane screen width [ -z "$COLUMNS" ] && COLUMNS=80 if [ -f /etc/sysconfig/i18n -a -z "$NOLOCALE" ] ; then . /etc/sysconfig/i18n if [ "$LANG" = "ja_JP.eucJP" -a "`/sbin/consoletype`" != "pty" ]; then unset LANG else export LANG fi fi # Read in our configuration [...] Note there is no clue whatever as to what the `if' clauses are doing. This same scenario extends to the rest or the init setup. _______________________________________________ Seawolf-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/seawolf-list