Mask Unit files over DBus doesn't work?

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

 



Hi,
Sorry if this is not the right place for questions, please point me in the right direction.

I'm trying to replace `systemctl` command invocations in our project with DBus calls. Starting/stopping services, requesting service properties work fine, but masking/unmasking do not.

This is the behavior I want to replicate with DBus:

    $ systemctl mask serial-getty@ttymxc0.service
    Created symlink /etc/systemd/system/serial-getty@ttymxc0.service → /dev/null.

    $ systemctl status serial-getty@ttymxc0.service
    ● serial-getty@ttymxc0.service
         Loaded: masked (Reason: Unit serial-getty@ttymxc0.service is masked.)
         Active: inactive (dead)
   
    $ systemctl start serial-getty@ttymxc0.service
    Failed to start serial-getty@ttymxc0.service: Unit serial-getty@ttymxc0.service is masked.

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@ttymxc0.service false false
    a(sss) 1 "symlink" "/etc/systemd/system/serial-getty@ttymxc0.service" "/dev/null"

    $ systemctl status serial-getty@ttymxc0.service
    ● serial-getty@ttymxc0.service - Serial Getty on ttymxc0
         Loaded: loaded (/usr/lib/systemd/system/serial-getty@.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.

I haven't found much documentation on systemd DBUS mask/unmask method calls. Apparently I'm missing something, but I don't know what.

OS: Custom 32bit ARM, systemd 244

Any ideas?

Thanks and regards,
   Gyorgy


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

  Powered by Linux