Skip to content

Commit 7f8c7a6

Browse files
committed
fix last commit
1 parent 8a23fbd commit 7f8c7a6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • mkp/local/share/check_mk/agents/plugins

mkp/local/share/check_mk/agents/plugins/yum

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ if [ "$YUM_CURRENT" != "$YUM_CACHED" ] || [ ! -s "$CACHE_RESULT_CHECK" ]
145145
then
146146
count=0
147147
# Check for running package manager processes
148-
while [ -n "$(pgrep -u root -f "(python|/usr/bin/).*/(yum|dnf)" | head -1)" ]; do
148+
while [ -n "$(pgrep -f "(python|/usr/bin/).*/(yum|dnf)" | head -1)" ]; do
149+
if [ $count -eq 3 ]; then
149150
echo "ERROR: Tried to run $PKG_MGR for 30 secs but another package manager instance was running"
150151
exit 2
151152
else

0 commit comments

Comments
 (0)