:: Re: [DNG] Mini init script written …
Kezdőlap
Delete this message
Reply to this message
Szerző: Irrwahn
Dátum:  
Címzett: Edward Bartolo, irrwahn35
CC: dng
Tárgy: Re: [DNG] Mini init script written in Perl boots.
On Fri, 17 Jun 2016 16:09:00 +0200, Edward Bartolo wrote:
> Hi,
>
> <<
> If 16 lines of C pose a mystery, one should look for another hobby.
> Or get a clue already.
>>>
> I was NOT referring to 16 lines of code, but to the source code for
> established inits like sysvinit, runit and systemd.


Apples and oranges. Comparing complete init (and in some of
the examples, process supervision) systems with a minimal
init that defers the real work to subordinate (collections
of) programs is the kind of misconception I was talking about
earlier.

A minimal PID1 (written in whatever language) is not an init
system. In your example you hid the insteresting stuff behind
some obscure script misleadingly called "osloader.sh". What
was your point again?

To get a *nix system properly initialized you either need
a minimal PID1 complemented by something like runit or s6,
or you use a more monolithic approach like SysV-Init, Upstart,
etc. pp. I believe that's basically what Katolaz tried to
convey in another post.

> If *at the first
> glance*, these projects do not instill some feeling of awe,


If you want to be instilled with some awe I suggest you look
at the kernel code for the fork() system call. Bottom line:
Everything looks simple, when you hide the complexity behind
some innocent looking function calls. And if you have trouble
understanding the code of the mentioned projects you are
doomed to fail in writing init systems.

> I chose to follow what I was recommended and actually wrote a
> RUDIMENTARY Perl script. Why are some so irritated about that?!


I'm irritated by the fact you post such scrips and make it
appear as if those actually work, by any definition of "work".
They do not. This is not even contradicted by the fact that it
appeared(!) to have brought up your system.

> Someone better than me, and I have no problem with people who are more
> talented than me, could grab the little source and enhance it. After
> all, this is the purpose of open source licensed under GPL-like
> licenses.


There is nothing to be enhanced here. It's a dead end. It
was a fling, not even qualified as an experiment.

> If I am to refer to what I prefer, I say, I prefer a C coded init that
> does not need a potentially buggy interpreter to run. However, I chose
> to listen to those who wanted a script and am still thinking about
> producing an extended version of Felker's init that can respond to
> shutdown signals. This should avoid having to "agetty tt1 &", log into
> the new terminal, and issue "/etc/init.d/rc 0" manually.


That's what the parts of init systems that perform the heavy
lifting are meant to do. It's not a question of some simple
extension to some script. BTW, what the heck did you think the
last line of Felker's original code did?

It's this arrogant attitude of "alright, got it, easy enough,
now I'm gonna improve on it" without bothering to actually
get to the bottom of even the basic concepts behind it, that
brought us systemd and other crap. If you keep this up you are
condemned to reinvent SysV-init (or OpenRC, or whatever), poorly.

Regards
Urban