0

As per the systemd documentation, there is a DBus method called MaskUnitFiles but when I try from busctl command-line, neither does it work, nor does auto-completion show this call!

$ sudo busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1/unit/my_2dsvc_2eservice org.freedesktop.systemd1.Unit <TAB>
Kill                Reload              ReloadOrTryRestart  Restart             Start               TryRestart          
Ref                 ReloadOrRestart     ResetFailed         SetProperties       Stop                Unref 

I tried :

busctl --system call org.freedesktop.systemd1  /org/freedesktop/systemd1/unit/getty_40tty1_2eservice MaskUnitFiles asbb /lib/systemd/system/getty@tty1.service false false

And get the error:

Failed to create bus message: Invalid argument

Not sure which argument is incorrect! what I am missing here?

In this particular case, for mask option, I can probably directly symlink the unit file name to /dev/null. But IMHO, the DBus method [if works] is uniform and cleaner.

Thanks.

Ani
  • 32
  • 12

0 Answers0