Skip to content

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

@bo0ts

Description

@bo0ts

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions