[linux-elitists] How about a fork of Jessie without systemd?

Tomasz Rola rtomek at ceti.pl
Tue May 24 06:24:45 PDT 2016


On Mon, May 23, 2016 at 09:19:00PM -0400, Rik van Riel wrote:
> On Tue, 2016-05-24 at 02:37 +0200, Tomasz Rola wrote:
> > On Mon, May 23, 2016 at 04:18:17PM -0700, Greg KH wrote:
> > > 
> > > But what's wrong with that?  Before you were all running a fork of
> > > init
> > > scripts, all hacked up in odd ways that were not compatible across
> > > any
> > > distro.  What has changed here?
> > This kind of argument has disputable value. I expect there will
> > "always" be an OS or flavour of some with "fork of init scripts" and
> > they will choose to not run systemd or they will choose to give it as
> > an option. And if Apache folks wanted to run theirs on such OS, they
> > will have to somehow support such scripts anyway. And so on. So I do
> > not see systemd as anything close to solving a problem. 
> 
> The "init scripts are different on different systems"
> problem may not be solved by systemd (though they will
> look the same on more systems), but systemd does solve
> a number of actual problems.

I think there is intetesting pattern among systemd supporters:

1. strong dislike of scripting, in particular shell scripting, as it seems

2. fascination with short boot time ("in 12 seconds" - nice, mine
boots in 120 seconds, yet I only do it once a day and speeding up may
look attractive, but a cost is prohibitive, so for a while I will keep
doing it my way - if it ever becomes a problem, I will just switch to
booting once a month, thus I will have average daily boot time below
4s)

> For one, it has a reliable way of detecting whether
> daemons are still running, more so than the old style
> shell scripts ever could.  It relies on cgroups to
> do this.

Is it so? Better than this:

=>  (627 2):   cp ~/bin/ice.sh ~/bin/demonumb.sh

=>  (627 3):   gvim ~/bin/demonumb.sh

=>  (627 11):     cat ~/bin/demonumb.sh
#!/bin/sh

ps ax | grep -iE "$1" | grep -ivE 'grep|demonumb' | wc -l

>  (627 8):   demonumb.sh boa
1

=>  (627 9):   demonumb.sh 'bo*'
114

=>  (627 10):   demonumb.sh 'bo.*'
3

=>  (627 12):   demonumb.sh bind
1

=>  (627 13):   demonumb.sh lpd
0

My "script" can see some improvement in a future. Right now it is just
a oneliner in a file, maybe 2 minutes of work, maybe 5 (gradually
getting better). Out of curiosity, in what way systemd improves upon
my script? I am not going to use systemd any time soon, so if it does
it better and I could emulate it in a script without too much work,
why not.

OTOH, if I can get 80% of functionality with one liner, next 10% with
20 lines and the remaining 10% would require that I rebuild the whole
way I use my system, then this last 10% is probably not worth the
effort.

> Secondly, it can use the same cgroups code to set up
> containers, and make sure the software inside the
> containers is running. The old shell scripts did not
> have a way to start things in containers at all.

After reading a bit:

http://serverfault.com/questions/560206/how-to-find-out-cgroup-of-a-particular-process

http://hydra.geht.net/tino/english/faq/debian/squeeze/cgroups/

I believe I can do a lot with cgroups using just scripting and
properly abusing /proc interface. Whether I can do the same or more
then with systemd is not so important as long as I can do whatever is
needed.

Mind you, scripting is not just /bin/sh or /bin/bash, it could as well
be /usr/bin/wish or /usr/bin/awk. But if you insisted on using proper
shell for it, than /usr/bin/zsh comes to help with tons of builtins
and almost 1.5 megabyte of man page:

=>  (895 5):   man zshall | wc
  26408  181799 1394826

Still, cannot see how systemd would make *my* life so much better that
I would want to abandon whatever I am using right now.

As of containers, seems like docker works on FreeBSD and Windows, so
perhaps I could go without needing systemd, again. They may also have
something else for FreeBSD, which I am yet to learn about.

-- 
Regards,
Tomasz Rola

--
** A C programmer asked whether computer had Buddha's nature.      **
** As the answer, master did "rm -rif" on the programmer's home    **
** directory. And then the C programmer became enlightened...      **
**                                                                 **
** Tomasz Rola          mailto:tomasz_rola at bigfoot.com             **


More information about the linux-elitists mailing list