5 ms·
Am I the only person who prefers systemd? Maybe because it's the only init system I've managed to get my head around. Other init systems seem so complicated. A
by ancarda 12y ago
Am I the only person who prefers systemd? Maybe because it's the only init system I've managed to get my head around. Other init systems seem so complicated. A config file vs a bash script is far easier and they all seem to require forking.
I only use Linux for servers so I may be unaware of a sane init system that works like systemd but isn't systemd. Until something like that appears, I'll stick to systemd.
- jws 12y agoI use systemd on all my servers. A couple of lines of declarative configure file to specify a daemon with its restart policy beats a messy shell script. For my custom processes I've ripped out all the chroot, fork, and setuid code added in a couple lines for systemd watchdog and status support calls. I'm not going back. Granted, journalctl with a filter is longer to type than cat. Someday I'll add nice alias to my shell rc.
- thomasz 12y agoNo. It's just that the people who want to get systemd and those do not care deeply about their init system have left and only those who see it as a threat to linux still bother.
- IshKebab 12y agoI don't think you're wrong. I imagine all these people saying systemd is so awful are just worried that their hard-earned sysvinit knowledge will become obsolete and that new users won't have to go through silly bash scripts (that are totally secure of course - no chance of security vulnerabilities in something as ancient and wtf-free as bash). Instead they'll have something sane like this: [Unit] Description=Apache 2 HTTP Web Server After=network.target [Service] Type=forking EnvironmentFile=/etc/conf.d/apache2 ExecStartPre=/bin/echo performing: /usr/sbin/apache2 -k start $APACHE2_OPTS ExecStart=/usr/sbin/apache2 -k start $APACHE2_OPTS ExecStop=/usr/sbin/apache2 -k graceful-stop $APACHE2_OPTS ExecReload=/usr/sbin/apache2 -k graceful $APACHE2_OPTS PIDFile=/var/run/apache2.pid StandardOutput=syslog StandardError=syslog Restart=always [Install] WantedBy=multi-user.target WantedBy=http-daemon.target This is the sysvinit file for apache from debian. #!/bin/sh ### BEGIN INIT INFO # Provides: apache2 # Required-Start: $local_fs $remote_fs $network $syslog $named # Required-Stop: $local_fs $remote_fs $network $syslog $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # X-Interactive: true # Short-Description: Start/stop apache2 web server ### END INIT INFO set -e SCRIPTNAME="${0##*/}" SCRIPTNAME="${SCRIPTNAME##[KS][0-9][0-9]}" if [ -n "$APACHE_CONFDIR" ] ; then if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then DIR_SUFFIX="${APACHE_CONFDIR##/etc/apache2-}" else DIR_SUFFIX= fi elif [ "${SCRIPTNAME##apache2-}" != "$SCRIPTNAME" ] ; then DIR_SUFFIX="-${SCRIPTNAME##apache2-}" APACHE_CONFDIR=/etc/apache2$DIR_SUFFIX else DIR_SUFFIX= APACHE_CONFDIR=/etc/apache2 fi if [ -z "$APACHE_ENVVARS" ] ; then APACHE_ENVVARS=$APACHE_CONFDIR/envvars fi export APACHE_CONFDIR APACHE_ENVVARS ENV="env -i LANG=C PATH=/usr/local/bin:/usr/bin:/bin" if [ "$APACHE_CONFDIR" != /etc/apache2 ] ; then ENV="$ENV APACHE_CONFDIR=$APACHE_CONFDIR" fi if [ "$APACHE_ENVVARS" != "$APACHE_CONFDIR/envvars" ] ; then ENV="$ENV APACHE_ENVVARS=$APACHE_ENVVARS" fi And so on...
- feld 12y agoHow does systemd handle situations where you need to check for the existence of directories and check their permissions, etc, before starting the service? You'd have to script it... and it would end up looking like a sysvinit script anyway.
- xobs 12y agoYou can add ConditionPathExists= or ConditionPathIsDirectory= to a Unit to check if one or more directories exist. You can also substitute the userid into commands with %U, so you could have it always chown before running the command, as you can have multiple ExecStart= directives. http://www.freedesktop.org/software/systemd/man/systemd.service.html http://www.freedesktop.org/software/systemd/man/systemd.serv... and http://www.freedesktop.org/software/systemd/man/systemd.unit.html http://www.freedesktop.org/software/systemd/man/systemd.unit...
- ck2 12y agoShow me where you do configtest in the systemd version? (you can't - it doesn't take custom EXEC commands)
- rakoo 12y agoConfig test is a human operation; you manually do it after you've edited the configuration, and if you've forgotten to do it then the next start will crash. It makes no sense to automate configtest.
- rodgerd 12y ago> Am I the only person who prefers systemd? No. I even gave a talk about how I came around to liking it at linux.conf.au this year. And I am a veteran *ix sysadmin. Something I have noticed is that most of the loudest anti-voices have no actual technical arguments against it, and generally haven't even run a system with it for a month; you can tell because so many of them clearly don't even know the most basic syntax.
- takeda 12y agoI personally like rcNG from FreeBSD (it possibly was borrowed from NetBSD, but I don't know the details). It is a great compromise between a shell script and a configuration file. Here is example of a simple use: http://svnweb.freebsd.org/base/releng/10.1/etc/rc.d/bsnmpd?revision=272461&view=markup http://svnweb.freebsd.org/base/releng/10.1/etc/rc.d/bsnmpd?r... But when you need more control, you still got it: http://svnweb.freebsd.org/base/releng/10.1/etc/rc.d/motd?revision=272461&view=markup http://svnweb.freebsd.org/base/releng/10.1/etc/rc.d/motd?rev...
- spb 12y ago> Am I the only person who prefers systemd? No: http://en.wikipedia.org/wiki/Silent_majority http://en.wikipedia.org/wiki/Silent_majority