There are two documented differences between start reboot.target
and reboot
. But start reboot.target
is what is triggered by ctrl-alt-del.target
.
Does it matter that ctrl-alt-del.target
will omit --job-mode=replace-irreversibly
? In what situations will this cause different behaviour? Why is it included by systemctl reboot
?
man systemctl
reboot [arg]
Shut down and reboot the system. This is mostly equivalent to
start reboot.target --job-mode=replace-irreversibly
, but also prints a
wall message to all users.
man systemd.special
ctrl-alt-del.target:
systemd starts this target whenever Control+Alt+Del is pressed on the console. Usually, this should be aliased (symlinked) to
reboot.target.
Best Answer
This suggests a practical effect. Suppose you "hook units into the sleep state logic", using
sleep.target
to pull them in. Your hook units do not haveDefaultDependencies=no
, so they depend onsysinit.target
... andConflict
withshutdown.target
.If you run
systemctl start reboot.target
and then immediatelysystemctl start suspend.target
, it seems that your hook unit will stopshutdown.target
. Nowsystemd-reboot.service
hasRequires=shutdown.target
, so it should be stopped/cancelled as well. (umount.target
should not be cancelled).I have verified a difference in behaviour along these lines and reported it as a defect in the systemd issue tracker.