Auteur: Irrwahn Datum: Aan: dng Onderwerp: Re: [DNG] Custom OS initiator. In need of some hints...
On Mon, 13 Jun 2016 21:37:11 -0400, Steve Litt wrote: > On Mon, 13 Jun 2016 22:49:27 +0200
> Irrwahn <irrwahn@???> wrote: [...] >> I'm probably missing something important here, so I have
>> to ask: What would be the point in replacing an easily
>> comprehensible, self-contained and statically linked piece
>> of code[1] by some script, howsoever simple, that relies
>> on an (in comparison) gigantic and potentially buggy blob
>> like a shell[2]?
>>
>> To me that's not exactly KISS. Does your mileage vary that
>> much, or am I simply missing the point?
>
>
> Hi Urban,
>
> I failed to make my point. Let me try again...
>
> The one and only point in replacing an easily comprehensible,
> self-contained and statically linked piece of code by some script is
> for the purposes of demonstration and propaganda. Nobody in
> their right mind would permanently use a shellscript to PID1 a machine
> used to do actual work.
That's what I hoped for, but you never know these days —
we're living in strange times. There have reportedly been
cases of people even trying to use systemd as the PID1 on
machines used to do actual work.
[...] > Right now, Felker's PID1 is the acknowledged "Hello World" PID1. But as
> I remember you have to add an #include to get it to work with
> mainstream Linuxes,
Yup, #include <sys/wait.h>, trivial.
> you have to get it to compile, and it's just not as
> understandable to non-C programmers.
>
> Hackers who might not know C are more able to put their own commands
> into the shellscript and see the result.
There's a point to be made about the value of actually
learning C and understand how the real thing works. There
are far to few good C programmers around these days, and
their number is dwindling. But that's another topic
altogether.
Note: I had to restrain myself from expanding even more
on your catchy notes about the propagandistic value; the
result probably wouldn't have been appropriate for this
(or any other) list, I ponder.
[...] > So Urban, once again, the reasons for a shellscript PID1 are:
>
> * Learning
> * Demonstration and teaching
> * Propaganda
Thanks Steve, got it. I just failed to see that that was
the only intent in your original comments.
> For real systems doing real work, use a compiled PID1.