From ace7b80a5bd39693f8bd7c7d36863e8a6d51b539 Mon Sep 17 00:00:00 2001 From: Lichen Liu Date: Mon, 29 Apr 2024 10:26:47 +0800 Subject: [PATCH] Fix potential-bashisms in monitor_dd_progress Resolves: RHEL-29044 Upstream: Fedora Conflict: None commit a5c17afe7e871f7a2593d04b97e8e77fb434642c Author: Coiby Xu Date: Fri Jan 12 20:00:53 2024 +0800 Fix potential-bashisms in monitor_dd_progress As suggested by Carl [1], > /usr/lib/dracut/modules.d/99kdumpbase/monitor_dd_progress has some > inconsistencies with other scripts in that directory. It is missing the > .sh extension and is not executable. The latter is resulting in an > rpmlint error. [1] https://bugzilla.redhat.com/show_bug.cgi?id=2239566#c2 Suggested-by: Carl George Signed-off-by: Coiby Xu Reviewed-by: Philipp Rudo Reviewed-by: Dave Young Signed-off-by: Lichen Liu --- dracut-kdump.sh | 2 +- dracut-module-setup.sh | 3 +-- dracut-monitor_dd_progress => dracut-monitor_dd_progress.sh | 0 3 files changed, 2 insertions(+), 3 deletions(-) rename dracut-monitor_dd_progress => dracut-monitor_dd_progress.sh (100%) diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 1fc2231..7b3ad7a 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -377,7 +377,7 @@ dump_raw() if ! echo "$CORE_COLLECTOR" | grep -q makedumpfile; then _src_size=$(stat --format %s /proc/vmcore) _src_size_mb=$((_src_size / 1048576)) - /kdumpscripts/monitor_dd_progress $_src_size_mb & + /kdumpscripts/monitor_dd_progress.sh $_src_size_mb & fi dinfo "saving vmcore" diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index daa6b26..7e1cb9f 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -1020,8 +1020,7 @@ install() { kdump_install_random_seed fi dracut_install -o /etc/adjtime /etc/localtime - inst "$moddir/monitor_dd_progress" "/kdumpscripts/monitor_dd_progress" - chmod +x "${initdir}/kdumpscripts/monitor_dd_progress" + inst "$moddir/monitor_dd_progress.sh" "/kdumpscripts/monitor_dd_progress.sh" inst "/bin/dd" "/bin/dd" inst "/bin/tail" "/bin/tail" inst "/bin/date" "/bin/date" diff --git a/dracut-monitor_dd_progress b/dracut-monitor_dd_progress.sh similarity index 100% rename from dracut-monitor_dd_progress rename to dracut-monitor_dd_progress.sh