docker-systemctl-replacement
docker-systemctl-replacement copied to clipboard
systemctl show does not respect multiple `-p/--property` switches
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
That allows for a generalization (develop branch)