[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Init system deba{te|cle}



On 11/04/2013 04:06 AM, berenger.morel@neutralite.org wrote:


Le 03.11.2013 10:23, Marko Randjelovic a écrit :
On Sat, 02 Nov 2013 15:58:45 +0100
berenger.morel@neutralite.org wrote:

_ sysvinit scripts are scripts. Scripts needs programming skills, and
the sh language does not have an easy to read syntax. I would in fact
call it rather obscure compared to various other languages I used.
Systemd configuration files are, real configuration files. Plain-text,
no XML (this point is important for me), no script (this one too). Just
some key-value associations.

I find shell scripts the most efficient way to automate system adin
tasks. It could be because I am a programmer,

Being a programmer does not imply to thinks as programming as an easy thing. I am also a programmer, and, I have no shame to say that I am not able to use all languages. For example, I can not use prolog effectively. Programming is more error-prone than real configuration files. A single typo can generate hard to debug problems, especially in non compiled languages, not to speak about lacks of strong typing.

_ systemd configuration files can be shared between distributions more
easily than sysvinit scripts. Thus, it is "more portable" across linux
distributions. The work being centralized, it makes the package's
maintainers needed to do less work.

There is nothing more standard/portable in Unix-like systems then POSIX
shell.

Other have replied this better than I could.

Another advantage it have, is that it is able to parallelize the start
of daemons, and to only start daemons when they are first used. It is
not an important feature on a server, but for desktops or laptops which
are computers you can start lot of times in a day, it can save time. On
that particular point, my opinion is that it is not the good solution:
the good solution is to only start daemons you really need.

I do not see 'start daemons when they are first used' is quite an
important benefit

Makes it faster to have a system you can use. There are probably other advantages like security: less things started, less security flaws. Not sure how this apply to systemd however.

Portability have a
cost, and it is often the lack of features or the need to reinvent the
wheel on some targets but not on all. WxWidgets knows the problem I am
talking about.

I'd say the problem is in the lack of real effort to solve programming
problems in an abstract way.

Portability imply to limit yourself to the greatest common factor, or to implement lacking features on targets yourself. A non implemented feature can not be abstracted.


And the last problem I can think about, is that it does things that are
not only system initialization. It means that, by itself, it might
become hard to maintain. I said might, because I never looked at
sysvinit source code (since it is old, it could bet not so clean, having
be maintained by lot of different people) not systemd's one (good
software designs can make things damn easy to maintain, even when they
do not do only one thing).

and so, which would imply duplicate work. If Debian was a normal Linux
distribution, then portability would not have been a problem.

I don't see why Debian is not a normal Linux distibution and how
is it related to portability

Because it's not limited to linux kernel.


There
would still be the lack of UNIX philosophy, but, be honest: any
distribution using Gnome, KDE or even XFCE as the default DE is already
damn far from the UNIX philosophy. I have nothing against that, do not
take me wrong, it is a choice. But using those DEs as defaults DE proves
that this philosophy is not so important.

I don't think UNIX philosophy is not so important. First of all, the
principle of all-might is by nature authoritarian. All-in-one
"solutions" are a characteristic of big companies that want to impress
their users, while not giving them enough real benefit.

I can not agree more, however my point is that there are currently no DE implementing it. The closer to it I know about is LXDE, which still have small issues in this regard.

Systemd makes
system startup more complicated and you need to know not only shell
scripts but also systemd syntax.

I'm interested. Do you have a document explaining that you need to use shell scripts with systemd? systemd supports shell scripts, but it's not because it have to, it is because it's authors wants and easy integration of existing stuff, AFAIK.

LXDE, on the other hand, would
be a better choice for a UNIX philosophy fan (better, not perfect, since
UNIX philosophy imply that softwares discuss between them by text only,
which can not really be easily done when you come to GUIs. I think that
raw UNIX philosophy is not adapted to modern graphical uses, but this is a personal opinion which can be changed rather easily since I want to be
wrong).

I do not think UNIX philosophy is not wrong, I think users are
wrong. Users want false impression of power and that only makes them
dependent on the software that makes them such an illusion, similar to
effect of narcotics. Look what RMS says about companies want to
control their users with software.

Users are not wrong: they do not want to have to write pieces of programs to use their system. I do not want to have to plug cables inside my car neither. Instead, I want to push a button and have the system replying to my request. Without me needing to alter it.


Couldn't agree more. I said in a different reply on this threat that managing services is probably better handled in a declarative style (Configuration) than an imperative (Programming) one. I am also a programmer and I think shell scripts are a poor way of managing services when simply declaring dependencies and what binaries to use is more efficient. And if you need some wrapper systemd supports shall scripts just fine. Also, being portable has never been a goal for systemd, so I'm not really sure that's criticism-worthy.

Not everyone is a programmer, but a lot of non-programmers are still admins but are not interested in working with shell scripts if they don't have to. Further, shell scripts can have any number of bugs in them that are harder to find than unit files which rarely have more than a dozen lines in them.


Reply to: