[Nut-upsdev] RFC: nut and systemd
Michal Hlavinka
mhlavink at redhat.com
Wed May 18 07:58:42 UTC 2011
> eh... seems I've forgot other comments... I'll have to write them down next
> time
and I've remembered just after sending that email :)
btw, I've accidentally sent last email only to the mailing list, so if you are
missing email with systemd patch attached, you can find it in archives.
> I'm already working on it. I'll send it to the list, when it's ready, but
> just right now it's blocked by bug in systemd.
that bug is not fixed yet, so ups-driver.service is not stopped automatically
after ups-daemon.service stopped.
> > AFAICT, sysV init and upstart can work with MODE (and "external"
> > settings). systemd seems to have a more simple approach, that doesn't
> > allow condition, nor external settings, nor any other hook than
> > start/stop/restart. do you know if there any plan for such non standard
> > actions/hooks for systemd?
systemd does not support extra actions like:
service httpd configtest (or /etc/init.d/httpd configtest )
only start/stop/restart/reload(=sighup)/try-restart/...
it's executed as:
systemctl <action> some.service [other.service ...]
and action can be one of (not *.service actions omitted):
start [NAME...] Start (activate) one or more units
stop [NAME...] Stop (deactivate) one or more units
reload [NAME...] Reload one or more units
restart [NAME...] Start or restart one or more units
try-restart [NAME...] Restart one or more units if active
reload-or-restart [NAME...] Reload one or more units is possible,
otherwise start or restart
reload-or-try-restart [NAME...] Reload one or more units is possible,
otherwise restart if active
isolate [NAME] Start one unit and stop all others
kill [NAME...] Send signal to processes of a unit
is-active [NAME...] Check whether units are active
status [NAME...|PID...] Show runtime status of one or more units
show [NAME...|JOB...] Show properties of one or more
units/jobs or the manager
reset-failed [NAME...] Reset failed state for all, one, or more
units
enable [NAME...] Enable one or more unit files
disable [NAME...] Disable one or more unit files
is-enabled [NAME...] Check whether unit files are enabled
load [NAME...] Load one or more units
http://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet
Conditions are not supported in systemd. If some special actions are required,
it should be split into several unit files (if possible) or put it at some
script and put that script in /usr/libexec/<package>/your_scripts
Right now, there is no plan to add conditions nor extra actions. Maybe if a
lot of people starts asking for it... (most init scripts are going to be
converted to service files during F16 development) But I don't see big chances
here... systemd developers are really really stubborn.
More information about the Nut-upsdev
mailing list