On Tue, Jul 15, 2014 at 10:32:16AM -0500, Les Mikesell wrote: > On Tue, Jul 15, 2014 at 10:18 AM, Jonathan Billings <billings@xxxxxxxxxx> wrote: > > 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. Yes, everything you type in a shell uses shell syntax. But systemd doesn't use a shell to start a program for a service. This has nothing to do with how programs are started from a shell, but rather how the init system is starting the program. Simplified, declaritive syntax, no need to write the entire logical sequence for handling the action verb parameter for each script ("Whoops! I forgot that ;; in the case statement!"). That's simpler. > > 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. If the entirety of the Linux startup process was written in simple shell code, that might be a useful line of argument, but even in CentOS6 there was a non-shell init system (Upstart) which requires understanding of a domain-specific language, plus dozens of other various configurations, like xinetd, cron, anacron, gdm, etc which start processes on boot. Each has their quirks. Not all of them use shell syntax, and even those that did had caveats. systemd just replaces Upstart, and can potentially replace xinetd and cron as well, using the same syntax and bringing in the ability to refer to each other for startup sequence management. I'm not arguing that you shouldn't learn shell programming (and I don't believe that Mr. Poettering is either), just that systemd units flattens the learning curve for creating new unit files. -- Jonathan Billings <billings@xxxxxxxxxx> _______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos