I am trying to run systemctl from a script to enable some systemd user session services inside a sysroot which is going to be used by an embedded system later. I found out, though, that when I run systemctl with both --global (to specify I want to enable a user systemd service) and --root (to specify the sysroot of the target system) parameters, I just get an error. For instance, it can easily be checked like this: # systemctl --global enable myapp.service ln -s '/usr/lib/systemd/user/myapp.service' '/etc/systemd/user/default.target.wants/myapp.service' # systemctl --global --root=/ enable myapp.service Operation failed: Invalid argument Is that a bug or an expected behavior? how should I accomplish what I want to do if that's expected? More information: ~# systemctl --version systemd 211 +PAM +LIBWRAP -AUDIT -SELINUX +IMA +SYSVINIT -LIBCRYPTSETUP -GCRYPT +ACL +XZ -SECCOMP -APPARMOR
This works fine with v230. Closing.
I confirm this is fixed for me now too. I'm using systemctl version 229.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.