diff --git a/dracut-kdump.sh b/dracut-kdump.sh index b92854e..25972e4 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -366,7 +366,7 @@ dump_raw() dinfo "saving to raw disk $_raw" if ! $(echo -n $CORE_COLLECTOR|grep -q makedumpfile); then - _src_size=`ls -l /proc/vmcore | cut -d' ' -f5` + _src_size=$(stat --format %s /proc/vmcore) _src_size_mb=$(($_src_size / 1048576)) /kdumpscripts/monitor_dd_progress $_src_size_mb & fi diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index d6011ee..80b5582 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -1029,6 +1029,7 @@ install() { inst "/bin/head" "/bin/head" inst "/bin/awk" "/bin/awk" inst "/bin/sed" "/bin/sed" + inst "/bin/stat" "/bin/stat" inst "/sbin/makedumpfile" "/sbin/makedumpfile" inst "/sbin/vmcore-dmesg" "/sbin/vmcore-dmesg" inst "/usr/bin/printf" "/sbin/printf"