Re: [DNG] Felker Init: was without-systemd.org not working

2020-05-21 Thread wirelessduck--- via Dng


>> On 21 May 2020, at 17:31, Steve Litt  wrote:
>> 
>> On Thu, 21 May 2020 05:13:52 +0100
>> tux...@sapo.pt wrote:
>> 
>> Citando Steve Litt :
>>> This whole discussion balances on the definition of "shell aware".
>>> What is "shell aware?"
>>> SteveT
>> Have you tried to write shell script code into the execution command  
>> of a systemd unit file?
>> it doesn't work right?!
>> Why do you think it doesn't work?
> 
> Because it's a configuration file, not a script.

I think they mean the specific “ExecStart=” line in the unit file that 
references the executable file and it’s arguments to run when the service is 
started.

https://www.freedesktop.org/software/systemd/man/systemd.service.html

Ref: § Command Lines

- - -8<- - -

This syntax is inspired by shell syntax, but only the meta-characters and 
expansions described in the following paragraphs are understood, and the 
expansion of variables is different. Specifically, redirection using "<", "<<", 
">", and ">>", pipes using "|", running programs in the background using "&", 
and other elements of shell syntax are not supported.

- - -8<- - -___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Felker Init: was without-systemd.org not working

2020-05-21 Thread Steve Litt
On Thu, 21 May 2020 05:13:52 +0100
tux...@sapo.pt wrote:

> Citando Steve Litt :
> 
> > This whole discussion balances on the definition of "shell aware".
> > What is "shell aware?"
> >
> > SteveT
> >
> >    
> 
> Have you tried to write shell script code into the execution command  
> of a systemd unit file?
> it doesn't work right?!
> Why do you think it doesn't work?

Because it's a configuration file, not a script.

> 
> For it to work you need 2 files, ... the service unit , and also a  
> shell script,

You mean the service unit and a binary executable that is the daemon,
right?

> But SysVInit only needs a script, no service unit required.. so its  
> more optimized, only a file to control something..

s6 operates the same way as sysvinit, only s6 run scripts are
MUCH less complex than sysvinit init scripts.

> 
> Why in hell would you need to create several files to control the
> same thing? Its stupid..

In s6 you don't, unless you have a finish script to define what happens
when the daemon terminates.

[snip stuff I don't understand]
 
> The Linux Stadard Base,
> have defines the LSB Headers, as a way to control the services..

Yeah, meaningful comments: What could *possibly* go wrong? With s6 and
runit, if you want runlevels (and I don't), you achieve them with
directories that can be symlinked.

> 
> And their definition was in the same file as the daemon is..
> So we expect only 1 file..

Huh?

One other thing: Although I prefer sysvinit to systemd (by a wide
margin), I'm not against using multiple files to do something. Truth be
told, with sysvinit I'd rather they have multiple files for start,
stop, restart and the like, than the typical 100+ line behemoths
exhibited by sysvinit and OpenRC.

I have a suggestion. The Obarun distro comes stock with the s6 init,
together with some helper software called "66". I suggest you install
Obarun somewhere, and add a couple daemons of your own. You'll see
exactly what files are necessary, and exactly what the supervisor part
of s6 does, and you can let us all know.

Thanks,

SteveT

Steve Litt 
May 2020 featured book: Troubleshooting Techniques
 of the Successful Technologist
http://www.troubleshooters.com/techniques
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Felker Init: was without-systemd.org not working

2020-05-20 Thread tuxd3v

Citando Steve Litt :


This whole discussion balances on the definition of "shell aware". What
is "shell aware?"

SteveT

 


Have you tried to write shell script code into the execution command  
of a systemd unit file?

it doesn't work right?!
Why do you think it doesn't work?

For it to work you need 2 files, ... the service unit , and also a  
shell script,
But SysVInit only needs a script, no service unit required.. so its  
more optimized, only a file to control something..


Why in hell would you need to create several files to control the same thing?
Its stupid..

Now in relation to s6, I need yet to read about it, maybe there are  
improvements..


Does s6 do the same mistake as systemd, with having 2 files for the  
same thing?


The Linux Stadard Base,
have defines the LSB Headers, as a way to control the services..

And their definition was in the same file as the daemon is..
So we expect only 1 file..
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Felker Init: was without-systemd.org not working

2020-05-20 Thread Steve Litt
On Tue, 19 May 2020 04:14:05 +0100
tux...@sapo.pt wrote:


> The problem is that this init systems are not shell aware.

I don't know what "shell aware" means. The minute a file begins with:

#!/bin/sh

the rest of the text executes according to the
grammar/syntax/capabilities of /bin/sh.

> yes they can fork and exec a shell script, 

What more would anyone want?

> but does the service files
> or daemon files are shell based?

I don't understand the preceding sentence.

> No they are not, they are in a intermediate language that for example
> in systemd, is not even Turing Feature complete( I am speaking about  
> the unit files language )..

That's systemd's problem, but a s6 run or finish script can be
written in /bin/sh, or even in compiled C++ if somebody wanted a
difficult life.

> 
> I don't know much about systemd, or s6 to be honest, only a bit..
> But the s6 creator told in the devuan conference that s6 is not shell
> aware, and I believe he told, there is not simple way to turn it
> shell aware..

This whole discussion balances on the definition of "shell aware". What
is "shell aware?"
 
SteveT

Steve Litt 
May 2020 featured book: Troubleshooting Techniques
 of the Successful Technologist
http://www.troubleshooters.com/techniques
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Felker Init: was without-systemd.org not working

2020-05-18 Thread tuxd3v

I believe I didn't expressed myself well, and so was badly understood..

Citando Steve Litt :


On Sat, 16 May 2020 22:04:51 +0100
tux...@sapo.pt wrote:

Hello,

Citando Steve Litt :

It's such a shame. Runit and s6 were both there, waiting to be
picked up and used. Both were 10 times easier than sysvinit. But
n.

All init systems that want to be taken seriously, need to accept also
the system language..

As I understand, and was also recognized by s6 creator at devuan
conference, s6 *cannot* run a script made in shell script( the
systems language.. )


Yes it can. I've created s6 run scripts programmed in /bin/sh.

Laurent Bercot *discourages* using /bin/sh in favor of the execline
language (http://www.troubleshooters.com/linux/execline.htm), but s6
run scripts can be created in almost any language, including /bin/sh.

Maybe you think at it like been a superfluous thing,


Not at all: I'd consider it almost a showstopper. Fortunately, s6
enables you to program run scripts (and finish scripts) in /bin/sh.
 


Anything can fork what is given..

The problem is that this init systems are not shell aware.
yes they can fork and exec a shell script, but does the service files  
or daemon files are shell based?
No they are not, they are in a intermediate language that for example  
in systemd, is not even Turing Feature complete( I am speaking about  
the unit files language )..


I don't know much about systemd, or s6 to be honest, only a bit..
But the s6 creator told in the devuan conference that s6 is not shell  
aware, and I believe he told, there is not simple way to turn it shell  
aware..

The question was put by KatolaZ, at the last Devuan conference..
If you have a chance look at the video of the devuan conference..
The s6 creator was there invited..

Best Regards,
tux
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Felker Init: was without-systemd.org not working

2020-05-18 Thread tuxd3v

hello,
 

Citando Dimitris via Dng :


On 5/17/20 12:04 AM, tux...@sapo.pt wrote:

But is a major flaw, being it a init system for a operating system, and
not beign able to run shell scripts( systemd has also this limitation.. )..


you're right about s6, but wrong about systemd.you can run shell  
scripts with that bloated beast.


What  I meant was that..you know..
systemd or S6 is not shell built-ins/ Environment  aware.

You can execute commands that are operating system available..
I believe that you can also do the same with S6,
But you can't use direct shell scripting language to be executed by  
systemd, or by S6( the proper developer of S6 spoke about that in the  
Devuan conference.. ).


They could had done it Shell aware, and substitute the crapy unit  
files with direct shell scripting,
Which is a lot more natural( as it is the system language.. ), and  
reduce the amount of files, for the same thing..


Moreover, a "called motive" for the systemd existence, as I recall it,  
"terminate the amount of files or symlinks "madness" that goes on  
SysVInit"..??anyone remember?

I do..

The result...
They ended creating a ton of symlinks more, plus the need of 2 files  
for each service o_0..using a closer method like is used in SysVInit  
with symlinks to the deamon..
In fact the number of symlinks that exist in systemd is *insanely*  
high, a lot but a lot bigger than in SysVinit..they are hidden..


They fork and exec what is given in the command, so for systemd, the  
thing get even uglier..
You need to create a Service unit file, that is not shell aware, and  
then you need to create the REAL SHELL SCRIPT to pass to that file, to  
be executed,

And then prepare it to run accordingly..insane!

if you think that systemd is shell friendly,
Test it, :)

You can start by a command that could be very basic like:
'A=0;WHILE READ LINE;DO ECHO $A:$LINE;LET ++A;DONE < /ETC/FSTAB'

And we doesn't even started to speak about Environment variables( and  
its propagation inside the same namespace )..
That is another atrocity that could had been prevented was it shell  
aware from the beginning, because you can set or unset variables in  
shell scripting when you want..


Let's take for example a SAP service,
That at least will take 7 different users, several databases( at least  
2 ), for several Java Installations( administration/ operators, etc )..
To Launch a service like this with systemd, is madness, the amount of  
environment variables are tons of them, the users are independent,  
will you put all environment variables in the same place( Shared )?
But that will destroy completely the idea of roles separation,  
security reasons..


I'am not saying that it is not impossible but you will start to mix,  
or share things, destroying your initial goal of having all services  
separated and communicating only via network/shm..

 

So long story short,
you can fork *only*, you don't have the shell awareness.. :)
Ofcourse if you only have basic services running, like ntp, stmp,dhcp,  
etc, its peanuts, anything can do the job..but for servers were you  
have a complex setup the problems start to be noticed..


Its my believe that systemd, as a project, started with the desktop  
Idea in mind, because its not designed with servers in mind..


You can look at the last disaster "homed"...
Even for desktop is terrible, you cant even run services when the  
keyboard is locked...crazy.. :D
It has a similar behaviour as with MS Windows( no surprise, as the  
developers that were developing it, had not real experience with unix  
before, but with windows they had plenty.. )..

 
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Felker Init: was without-systemd.org not working

2020-05-17 Thread Steve Litt
On Sun, 17 May 2020 13:46:28 +0200
Didier Kryn  wrote:

> Le 16/05/2020 à 11:30, Steve Litt a écrit :
> > On Fri, 15 May 2020 14:44:06 -1000
> > Joel Roth via Dng  wrote:
> >
> >  
> >> Reminds me to revisit https://ewontfix.com/14/
> >> for Felker's Broken by Design article on systemd.  
> > That web page changed my life. When I saw, on that page, how simple
> > PID1 could really be, that was when I really started to despise
> > systemd. 
>      I just re-read this nice document, thanks for reminding it.
> 
>      It is very intresting because it immediately raises a question: 
> what if pid2 (called rc here) crashes? It isn't respawned by pid1.

Your preceding paragraph is *precisely* the strongest 
stated benefit of s6 over runit: s6 supervises its equivalent to the rc
file, whereas runit pretty much conforms to Felker's model.

If one is worried about the rc file crashing, one should use s6. I've
been using runit almost 5 years, and I don't remember a case of the rc
file crashing. Keep in mind that the rc file can fork off everything it
needs to fork off, doublefork the things it wants parented by PID1, and
then when the rc file's work is done, it simply exits. 

> 
>      rc, as the supervisor of all other daemons, is essential to 
> maintain the state of the system. I can think of four options when it 
> crashes:
> 
> 1) respawn it, but then, why wouldn't it crash again immediately?
> 
> 2) reboot, but this may have the same effect as opton 1 if the cause
> of the crash persists.
> 
> 3) stop the system, but why wouldn't it produce the same effect as
> the two options above at next boot.
> 
> 4) do nothing and let the admin investigate. But at least there
> should be a possibility for the admin to log in on the console, which
> means spawning and re-spawning getty or sulogin.
> 
>      Therefore, as it has been said already, I'm for keeping the
> current sysv-init (but not sysv-rc) as is, 

That's exactly how I feel. It's just so easy to use sysv PID1 with a
different supervisor. I think also it's necessary to keep some of the
sysvinit early boot stuff. But the daemons would all be easier to do
with a separate process supervisor.

> instead of reducing it to
> the minimalistic example of Rich Felker, despite my respect and
> admiration for him.

Even Rich Felker admitted a practical init would need to be more
complicated than his 16 line PID1.

SteveT

Steve Litt 
May 2020 featured book: Troubleshooting Techniques
 of the Successful Technologist
http://www.troubleshooters.com/techniques
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Felker Init: was without-systemd.org not working

2020-05-17 Thread Steve Litt
On Sat, 16 May 2020 22:04:51 +0100
tux...@sapo.pt wrote:

> Hello,
> 
> Citando Steve Litt :
> 
> > It's such a shame. Runit and s6 were both there, waiting to be
> > picked up and used. Both were 10 times easier than sysvinit. But
> > n.  
> 
> All init systems that want to be taken seriously, need to accept also
> the system language..
> 
> As I understand, and was also recognized by s6 creator at devuan
> conference, s6 *cannot* run a script made in shell script( the
> systems language.. )

Yes it can. I've created s6 run scripts programmed in /bin/sh.

Laurent Bercot *discourages* using /bin/sh in favor of the execline
language (http://www.troubleshooters.com/linux/execline.htm), but s6
run scripts can be created in almost any language, including /bin/sh.

> 
> Maybe you think at it like been a superfluous thing,

Not at all: I'd consider it almost a showstopper. Fortunately, s6
enables you to program run scripts (and finish scripts) in /bin/sh.
 
SteveT

Steve Litt 
May 2020 featured book: Troubleshooting Techniques
 of the Successful Technologist
http://www.troubleshooters.com/techniques
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Felker Init: was without-systemd.org not working

2020-05-17 Thread Didier Kryn

Le 16/05/2020 à 11:30, Steve Litt a écrit :

On Fri, 15 May 2020 14:44:06 -1000
Joel Roth via Dng  wrote:



Reminds me to revisit https://ewontfix.com/14/
for Felker's Broken by Design article on systemd.

That web page changed my life. When I saw, on that page, how simple PID1
could really be, that was when I really started to despise systemd.


    I just re-read this nice document, thanks for reminding it.

    It is very intresting because it immediately raises a question: 
what if pid2 (called rc here) crashes? It isn't respawned by pid1.


    rc, as the supervisor of all other daemons, is essential to 
maintain the state of the system. I can think of four options when it 
crashes:


1) respawn it, but then, why wouldn't it crash again immediately?

2) reboot, but this may have the same effect as opton 1 if the cause of 
the crash persists.


3) stop the system, but why wouldn't it produce the same effect as the 
two options above at next boot.


4) do nothing and let the admin investigate. But at least there should 
be a possibility for the admin to log in on the console, which means 
spawning and re-spawning getty or sulogin.


    Therefore, as it has been said already, I'm for keeping the current 
sysv-init (but not sysv-rc) as is, instead of reducing it to the 
minimalistic example of Rich Felker, despite my respect and admiration 
for him.


    Didier


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Felker Init: was without-systemd.org not working

2020-05-17 Thread Dimitris via Dng
On 5/17/20 12:04 AM, tux...@sapo.pt wrote:
> But is a major flaw, being it a init system for a operating system, and
> not beign able to run shell scripts( systemd has also this limitation.. )..

you're right about s6, but wrong about systemd.
you can run shell scripts with that bloated beast.



signature.asc
Description: OpenPGP digital signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Felker Init: was without-systemd.org not working

2020-05-17 Thread dal
Hello Steve,

>  This enraged me:
> The fact that a Troubleshooting Trainer could make an init in a couple
> weeks, yet the Redhat/Freedesktop/Poettering axis was telling us what a
> complex thing an init was.

They have in mind their own, different from yours and mine,
idea of how the computers are to be used and administrated:

A clueless user and magic behind the scenes, which also
keeps the user clueless forever - good for business.

/D
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Felker Init: was without-systemd.org not working

2020-05-16 Thread tuxd3v

Hello,

Citando Steve Litt :


It's such a shame. Runit and s6 were both there, waiting to be picked
up and used. Both were 10 times easier than sysvinit. But n.


All init systems that want to be taken seriously, need to accept also  
the system language..


As I understand, and was also recognized by s6 creator at devuan conference,
s6 *cannot* run a script made in shell script( the systems language.. )

Maybe you think at it like been a superfluous thing,
But is a major flaw, being it a init system for a operating system,  
and not beign able to run shell scripts( systemd has also this  
limitation.. )..


Best Regards,
tux
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Felker Init: was without-systemd.org not working

2020-05-16 Thread Steve Litt
On Sat, 16 May 2020 11:41:29 +0200
Antony Stone  wrote:

> On Saturday 16 May 2020 at 11:30:03, Steve Litt wrote:
> 
> > You know, runit's or s6's process supervisor could be used, on
> > systemd systems, as a tobacco patch to wean the user off systemd,
> > one process at a time. As each daemon gets moved to runit or s6,
> > that daemon's unit file name gets put in a shellscript that
> > disables systemd's execution of that daemon. It's very easy to do.  
> 
> Surely one of the biggest problems (or at least, one of the things
> people complain most about) regarding systemd is that it is no longer
> just an init system.
> 
> It may have been sold that way in the early days, but it's now
> infiltrated so many parts of the GNU / Linux system that just telling
> people (or showing them) that they can use something else to manage
> their daemons is no longer enough.

Your two preceding paragraphs are absolutely true, which is why s6
supervisor as a patch is an excellent tactic in the strategy to one by
one either/both limit systemd damage and/or replace systemd
functionalities.

Another benefit if s6 as a tobacco patch and later tobacco patches: The
more DIY types who do these things, the more collective knowledge will
be available to call bullshit on the nonsense propagated by the
Redhat/Freedesktop/Poettering axis and their chatterbox repeaters.

My preceding paragraph is the carrot. The stick is that if we let
systemd get too far ahead of us, it will become too bubble-gummed into
our systems to ever remove.

Just speaking for myself, I think a great intermediate goal for Devuan
would be to keep the sysvinit PID1, and use it with the process
supervisor for s6. s6 is still under active development and is getting
**good** features all the time, while remaining simple and logical.

SteveT

Steve Litt 
May 2020 featured book: Troubleshooting Techniques
 of the Successful Technologist
http://www.troubleshooters.com/techniques
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Felker Init: was without-systemd.org not working

2020-05-16 Thread Rick Moen via Dng
Quoting Antony Stone (antony.st...@devuan.open.source.it):

> It may have been sold that way in the early days, but it's now
> infiltrated so many parts of the GNU / Linux system that just telling
> people (or showing them) that they can use something else to manage
> their daemons is no longer enough.

Except that robust alternatives exist for all of the other major areas
where systemd is touted as the One True Solution.  And, as I've shown in
my own modest writings, it remains a pretty easy task to swap in modular
replacements, each chosen with an appropriate scope of functionality[1]
rather than a figurative brass band (or in other cases, such as daemon
supervision in most cases, electing to omit entirely as not needed).

I mean, c'mon, this isn't the first time the right solution to scope
creep and pathologically excessive integration was to say 'But I don't 
actually want that.'

When the 'crowd pushing systemd' (to borrow Rich Felker's phrase), in early
day ballyhooed how great systemd's allegedly innovative daemon
supervision was, I was right then administering many hundreds of CentOS
Internet servers running (selected) critical daemons under Chris
McDonough's Python-based supervisord -- so, my reaction was 'What, you
think you systemd guys invented process supervision?  And what else, the
light bulb?  Toilet paper?'  (To answer Rich Felker's doubt-raising,
yes, supervisord is IMO robust enough, and also the others he cites.)

IMO, pretty nearly the only place the systemd suite has an arguably
compelling advantage is an exotic one:  cgroups controller.  This makes 
systemd irritably difficult to avoid for containerised cloud computing,
and, cgroup controllers have that Highlander quality that 'There can be
only one' (in a running system).  The systemd implementation is crammed
like much else into PID1, which has operational advantages over the 
better-security alternative of _not_ running it out of PID1 (as does
OpenRC's implementation, https://wiki.gentoo.org/wiki/OpenRC/CGroups ).

[1] E.g., I remain unconvinced I need a half-dozen different ways to 
refer to a device node.

-- 
Cheers,
Rick MoenDiaeresis:  Keeping the cow out of co-worker since 700 AD.
r...@linuxmafia.com
McQ! (4x80)   
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Felker Init: was without-systemd.org not working

2020-05-16 Thread Antony Stone
On Saturday 16 May 2020 at 11:30:03, Steve Litt wrote:

> You know, runit's or s6's process supervisor could be used, on systemd
> systems, as a tobacco patch to wean the user off systemd, one process
> at a time. As each daemon gets moved to runit or s6, that daemon's unit
> file name gets put in a shellscript that disables systemd's execution
> of that daemon. It's very easy to do.

Surely one of the biggest problems (or at least, one of the things people 
complain most about) regarding systemd is that it is no longer just an init 
system.

It may have been sold that way in the early days, but it's now infiltrated so 
many parts of the GNU / Linux system that just telling people (or showing 
them) that they can use something else to manage their daemons is no longer 
enough.


Antony.

-- 
Most people have more than the average number of legs.

   Please reply to the list;
 please *don't* CC me.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng