From 5ea43f78545b21c5072bf731c7148bfd79ddfeeb Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Sat, 12 Aug 2017 17:52:00 +0200 Subject: [PATCH] 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 --- modules/debian_org/files/dsa-is-shutdown-scheduled | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.20.1