diff --git a/dracut-kdump.sh b/dracut-kdump.sh index faeb7c5..2ae746e 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -102,6 +102,7 @@ dump_ssh() local _opt="-i $1 -o BatchMode=yes -o StrictHostKeyChecking=yes" local _dir="$KDUMP_PATH/$DATEDIR" + cat /var/lib/random-seed > /dev/urandom ssh -q $_opt $2 mkdir -p $_dir || return 1 if [ "${CORE_COLLECTOR%% *}" = "scp" ]; then diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 4795d8c..79b3766 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -17,6 +17,11 @@ depends() { return 0 } +is_ssh_dump_target() +{ + grep -q "^ssh[[:blank:]].*@" /etc/kdump.conf +} + kdump_to_udev_name() { local dev="$1" @@ -339,6 +344,9 @@ kdump_check_iscsi_targets () { install() { kdump_install_conf + if is_ssh_dump_target; then + dracut_install /var/lib/random-seed || exit $? + fi inst "$moddir/monitor_dd_progress" "/kdumpscripts/monitor_dd_progress" chmod +x ${initdir}/kdumpscripts/monitor_dd_progress inst "/bin/dd" "/bin/dd"