Mask Unit files over DBus doesn't work?
Dan Nicholson
dbn at endlessos.org
Thu Dec 14 15:35:38 UTC 2023
On Thu, Dec 14, 2023 at 3:57 AM Gyorgy Szekely <hoditohod at gmail.com> wrote:
>
> This is what happens when I use DBus: (with busctl for the sake of this discussion)
>
> $ busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager MaskUnitFiles asbb 1 serial-getty at ttymxc0.service false false
> a(sss) 1 "symlink" "/etc/systemd/system/serial-getty at ttymxc0.service" "/dev/null"
>
> $ systemctl status serial-getty at ttymxc0.service
> ● serial-getty at ttymxc0.service - Serial Getty on ttymxc0
> Loaded: loaded (/usr/lib/systemd/system/serial-getty at .service; enabled; vendor preset: disabled)
> Active: inactive (dead)
>
> The reported symlink is there in both cases, but while in the 1st case the service is indeed masked and cannot be started, in the 2nd case no such thing is reported and the service can be started.
It seems like the daemon hasn't been told to reload state based on the
filesystem state. I wonder if it starts working if you run
daemon-reload (or the DBus equivalent) afterwards.
--
Dan
More information about the systemd-devel
mailing list