From: Aurelien Jarno Date: Sat, 12 Aug 2017 15:52:00 +0000 (+0200) Subject: dsa-is-shutdown-scheduled: rewrite the systemd-shutdownd test using pgrep X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=5ea43f78545b21c5072bf731c7148bfd79ddfeeb;p=mirror%2Fdsa-puppet.git dsa-is-shutdown-scheduled: rewrite the systemd-shutdownd test using pgrep Otherwise we end up detecting the command started by dsa-is-shutdown-scheduled when the script is launched twice or more at the same time. Signed-off-by: Aurelien Jarno --- diff --git a/modules/debian_org/files/dsa-is-shutdown-scheduled b/modules/debian_org/files/dsa-is-shutdown-scheduled index c23f2f2ed..4dd1a7fb1 100644 --- a/modules/debian_org/files/dsa-is-shutdown-scheduled +++ b/modules/debian_org/files/dsa-is-shutdown-scheduled @@ -5,7 +5,7 @@ if /usr/lib/nagios/plugins/check_procs -w 1: -u root -C shutdown > /dev/null; th exit 0 fi # jessie -if /usr/lib/nagios/plugins/check_procs -w 1: -u root -a /lib/systemd/systemd-shutdownd > /dev/null; then +if pgrep -u root -fx /lib/systemd/systemd-shutdownd > /dev/null; then exit 0 fi # stretch