[SONiC-CEL]: fix platform fancontrol testcase failure issue (#10934)

This commit is contained in:
Eric Zhu 2022-05-31 10:54:55 +08:00 committed by GitHub
parent 912923f47b
commit 8c1ded61b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -348,8 +348,12 @@ CheckFiles || exit 1
if [ -f "$PIDFILE" ]
then
echo "File $PIDFILE exists, is fancontrol already running?" >&2
exit 1
# Test if process is really running, if not, no need to exit
if ps -p $(echo $PIDFILE) > /dev/null
then
echo "File $PIDFILE exists, is fancontrol already running?" >&2
exit 1
fi
fi
echo $$ > "$PIDFILE"