[CentOS] Cemtos 7 : Systemd alternatives ?

Les Mikesell lesmikesell at gmail.com
Tue Jul 15 15:32:16 UTC 2014


On Tue, Jul 15, 2014 at 10:18 AM, Jonathan Billings <billings at negate.org> wrote:
>
>> >> 1. See the systemd myths web page
>> >> http://0pointer.de/blog/projects/the-biggest-myths.html
>> >
>> > In the interest of full disclosure, that page is written by one of the
>> > primary authors of systemd, so we shouldn't expect an unbiased opinion.
>> > (Not saying it's wrong, only that it's important to understand the
>> > perspective an author might have.)
>>
>> One thing that bothers me very much when reading that is the several
>> mentions of how you don't need to learn shell syntax as though that is
>> an advantage or as if the author didn't already know and use it
>> already.   As if he didn't understand that _every command you type at
>> the command line_ is shell syntax.   Or as if he thinks learning a
>> bunch of special-case language quirks is somehow better than one that
>> you can use in many other situations.  When you get something that
>> fundamental wrong it is hard to take the rest seriously.
>
> You mean this paragraph?
>
> "systemd certainly comes with a learning curve. Everything
> does. However, we like to believe that it is actually simpler to
> understand systemd than a Shell-based boot for most people. Surprised
> we say that? Well, as it turns out, Shell is not a pretty language to
> learn, it's syntax is arcane and complex. systemd unit files are
> substantially easier to understand, they do not expose a programming
> language, but are simple and declarative by nature. That all said, if
> you are experienced in shell, then yes, adopting systemd will take a
> bit of learning."


> I think the point is that systemd unit file syntax is significantly
> simpler than shell syntax -- can we agree on that?

No.  Everything you type on a command line is shell syntax.  If you
don't think that is an appropriate way to start programs you probably
shouldn't be using a unix-like system, much less redesigning it.  If
you don't think the shell is the best tool, how about fixing it so it
will be the best in all situations.

> It also is
> significantly less-featureful than a shell programming language.  Yes,
> you're going to be using shell elsewhere, but in my experience, the
> structure of most SysVinit scripts is nearly identical, and where it
> deviates is where things often get confusing to people not as familiar
> with shell scripting.  Many of the helper functions in
> /etc/rc.d/init.d/functions seem to exist to STOP people from writing
> unique shell code in their init scripts.

Yes, reusing common code and knowledge is a good thing.  But spending
a bit of time learning shell syntax will help you with pretty much
everything else you'll ever do on a unix-like system, where spending
that time learning a new way to make your program start at boot will
just get you back to what you already could do on previous systems.

-- 
    Les Mikesell
     lesmikesell at gmail.com



More information about the CentOS mailing list