shfmt kdump-udev-throttler

Resolves: https://issues.redhat.com/browse/RHEL-104940
Conflict: .github/workflows/main.yml only exists in upstream

commit 6fa302cb75c9f0d7a8a5499f91450d2d584baff1
Author: Coiby Xu <coxu@redhat.com>
Date:   Wed Jul 23 10:14:21 2025 +0800

    shfmt kdump-udev-throttler

    And add kdump-udev-throttler to the list for shfmt as well.

    Signed-off-by: Coiby Xu <coxu@redhat.com>

Signed-off-by: Coiby Xu <coxu@redhat.com>
This commit is contained in:
Coiby Xu 2025-10-09 16:51:36 +08:00
parent 557335e8a1
commit f1ee3f6e22

View File

@ -15,17 +15,17 @@
throttle_lock="/var/lock/kdump-udev-throttle"
exec 9>$throttle_lock
exec 9> $throttle_lock
if [ $? -ne 0 ]; then
echo "Failed to create the lock file! Fallback to non-throttled kdump service restart"
/bin/kdumpctl reload
exit 1
echo "Failed to create the lock file! Fallback to non-throttled kdump service restart"
/bin/kdumpctl reload
exit 1
fi
flock -n 9
if [ $? -ne 0 ]; then
echo "Throttling kdump restart for concurrent udev event"
exit 0
echo "Throttling kdump restart for concurrent udev event"
exit 0
fi
# Wait for at least 1 second, at most 4 seconds for udev to settle