Re: Why is my reboot.target disabled?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05.07.2023 11:57, Ferenc Wágner wrote:
Andrei Borzenkov <arvidjaar@xxxxxxxxx> writes:

On 04.07.2023 14:58, Ferenc Wágner wrote:

Please help me understand this phenomenon (systemd 252):

$ systemctl status ctrl-alt-del.target
○ reboot.target - System Reboot
       Loaded: loaded (/lib/systemd/system/reboot.target; disabled; preset: enabled)
       Active: inactive (dead)
         Docs: man:systemd.special(7)

$ ls -l /{etc,run}/systemd/system | fgrep reboot

$ ls -l /lib/systemd/system | fgrep reboot
lrwxrwxrwx 1 root root   13 febr  28 12.15 ctrl-alt-del.target -> reboot.target
-rw-r--r-- 1 root root  443 febr   1 18.20 plymouth-reboot.service
-rw-r--r-- 1 root root  598 febr  16 19.10 reboot.target
drwxr-xr-x 2 root root 4096 ápr   22 22.15 reboot.target.wants
lrwxrwxrwx 1 root root   13 febr  28 12.15 runlevel6.target -> reboot.target
-rw-r--r-- 1 root root  568 febr  16 19.10 systemd-reboot.service

What does it mean that reboot.target is disabled?

It means links listed in [Install] section are not present.

$ systemctl cat reboot.target
[...]
[Install]
Alias=ctrl-alt-del.target

and there is a /lib/systemd/system/ctrl-alt-del.target -> reboot.target
symlink as show above.  Why doesn't it count?


Technically link in /etc does not exist and enable/disable machinery was created to manage links in /etc. But what happens now is certainly inconsistent.

bor@bor-Latitude-E5450:~$ systemctl status ctrl-alt-del.target
○ reboot.target - System Reboot
Loaded: loaded (/lib/systemd/system/reboot.target; disabled; vendor preset: enabled)
     Active: inactive (dead)
       Docs: man:systemd.special(7)
bor@bor-Latitude-E5450:~$ systemctl is-enabled ctrl-alt-del.target
alias
bor@bor-Latitude-E5450:~$ echo $?
0
bor@bor-Latitude-E5450:~$

I do not know if this is intentional or a bug.

Maybe related: why does 90-systemd.preset enable reboot.target but
disable poweroff.target (for example)?

There can be just one link target for ctrl-alt-del and reboot is the
most logical one.

And it's actually there, isn't it?




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux