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 [email protected]
    Created symlink /etc/systemd/system/[email protected] →
/dev/null.

    $ systemctl status [email protected][email protected]
         Loaded: masked (Reason: Unit [email protected] is
masked.)
         Active: inactive (dead)

    $ systemctl start [email protected]
    Failed to start [email protected]: Unit
[email protected] 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
[email protected] false false
    a(sss) 1 "symlink" "/etc/systemd/system/[email protected]"
"/dev/null"

    $ systemctl status [email protected][email protected] - Serial Getty on ttymxc0
         Loaded: loaded (/usr/lib/systemd/system/[email protected];
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

Reply via email to