From e07098aa146ee4a79e9d10c2ea92ffea7ca7d276 Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Nov 09 2021 12:38:55 +0000 Subject: bash scripts: remove useless cat upstream: fedora resolves: bz2003832 conflict: load_kdump_kernel_key() didn't present in rhel9, so removed the patch for it. commit 6d45257cc15b3a5b28ed3bfdacb06af065aaecb7 Author: Kairui Song Date: Wed Aug 4 15:14:00 2021 +0800 bash scripts: remove useless cat Some `cat` calls are useless, remove them to make it cleaner. See: https://github.com/koalaman/shellcheck/wiki/SC2002 Signed-off-by: Kairui Song Acked-by: Philipp Rudo Signed-off-by: Tao Liu --- diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 1519f50..f354f45 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -114,7 +114,7 @@ kdump_setup_dns() { _dns=$(echo $_nameserver | cut -d' ' -f2) [ -z "$_dns" ] && continue - if [ ! -f $_dnsfile ] || [ ! $(cat $_dnsfile | grep -q $_dns) ]; then + if [ ! -f $_dnsfile ] || ! grep -q "$_dns" "$_dnsfile" ; then echo "nameserver=$_dns" >> "$_dnsfile" fi done < "/etc/resolv.conf" @@ -985,7 +985,9 @@ kdump_configure_fence_kdump () { # Install a random seed used to feed /dev/urandom # By the time kdump service starts, /dev/uramdom is already fed by systemd kdump_install_random_seed() { - local poolsize=`cat /proc/sys/kernel/random/poolsize` + local poolsize + + poolsize=$(