Re: Teaching standard init config... On Sun, 27 Nov 2005, in the Usenet newsgroup comp.os.linux.setup, in article
<QoCdnYzoTZizMxTeRVn-sQ@comcast.com>, Nico Kadel-Garcia wrote:
>"Moe Trin" wrote:
>> Enrique Perez-Terron wrote:
>>>In other words, your mission is not to teach them a recipe of twenty
>>>keypresses and two mouse gestures that installs apache as a service on
>>>a computer running no matter what distribution.
which doesn't, in any case. exist. Each has their own way of doing so.
>>>Your mission is to enable them to figure out how it is done on their
>>>particular distro, with the fallback of writing a script they can
>>>stick in /etc/inittab.
>> BRAVO!!! Well stated, sir!!!
>> The 'init' used in many modern UNIX or UNIX-like systems influenced by
>> SystemV (and that includes Linux) looks for a file named /etc/inittab,
>> and away we go. Yes, /etc/inittab may call a bewildering choice of
>> files, but it's the common starting point.
>> To the original poster - Reading the "From-PowerUp-To-Bash-Prompt-HOWTO"
>> really would be a good idea, and it might even be a useful document for
>> your class to read as a homework assignment.
>Umm, guys? There's only so much time available in any course.
I understand that, and really don't expect the O/P to try to teach the
"From-PowerUp-To-Bash-Prompt-HOWTO". There is no need to even teach
shell scripting and how to use a man page, as basic concepts should be a
pre-requisite to the course. The world doesn't need another twenty r00ted
web sites run by people who don't have the basic knowledge to use a push
button telephone but are doing so because they saw someone randomly
pressing keys on a TV ad for Wankers'R'us.
The man pages for 'init', 'inittab' (and maybe even initscript) are not
anywhere near as difficult as trying to read through some of the exotic
"show 'em how great a programmer we are" stuff that is in the specific
scripts. "When the kernel starts, the first thing it runs is 'init'.
Init looks at the file /etc/inittab to find out what runlevel is desired
if it was not passed this parameter by the boot loader, and then runs
these scripts in this order. rc.sysinit does this, that, and the other.
rc runs scripts that do this and that, based on the run level. It runs
the K scripts in the run level directory with the parameter 'stop' and
then the S scripts in the same directory with the parameter 'start'. Those
scripts are normally links to the actual scripts in the init.d directory.
Here is how one script works..." yada, yada, yada. Yes, it would take
longer than that, but you can pack a hell of a lot of information into
an hour.
>As wonderful as it can be to learn the basics, getting deeply into
>inittab *as well as* the init scripts may cut into time for more Apache
>specific material this person may need to cover.
You don't need to get that deeply into /etc/inittab, and anyway, they
wouldn't need to - other than understanding the sequence that the scripts
are run, and why you don't start Apache out of the top of that file (if
at all), and that you need networking before networking daemons. As far
as the init scripts - I don't know whether to blame Miquel van Smoorenburg,
or the herd that followed for the obfuscated material in the average init
scripts, but sometimes I do recommend reading those scripts (along with
the man page for the shell and the server being started/commands being run,
and the abs-guide from The Grendel) to try to learn scripting techniques.
>If you've got the time to cover it, I agree.
Some things need to be pre-requisites. Configuring a server securely is
not a click and move a slider or activate a radio button type of thing.
Congratulations. You've just figured out that they lied to you
when they told you even an untrained monkey on crack can use a
computer. Yes, there's a lot to learn
That's not mine, but it does hit the mark pretty accurately.
Old guy |