Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemctl show does not respect multiple -p/--property switches #174

Open
bo0ts opened this issue Feb 5, 2024 · 1 comment
Open

systemctl show does not respect multiple -p/--property switches #174

bo0ts opened this issue Feb 5, 2024 · 1 comment

Comments

@bo0ts
Copy link

bo0ts commented Feb 5, 2024

systemctl show allows multiple properties to be printed. This is a feature used by chef to detect unit state...

Running on a real systemd installation:

# systemctl show -p Type -p Restart haproxy.service
Type=notify
Restart=always
# systemctl --version
systemd 237
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid

Running with the replacement python script. Notice the missing Type property:

# systemctl show -p Type -p Restart haproxy.service
Restart=always
# systemctl version
systemd 219
  - via systemctl.py 1.5.7417
-PAM -AUDIT -SELINUX -IMA -APPARMOR -SMACK +SYSVINIT -UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL -XZ -LZ4 -SECCOMP -BLKID -ELFUTILS -KMOD -IDN
@gdraheim
Copy link
Owner

gdraheim commented Feb 5, 2024

That allows for a generalization (develop branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants