From 5be00af7c80ed4972c1f3379e6db9937e1a8b7bd Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 26 Jul 2024 17:19:39 +0000 Subject: automatic import of kexec-tools --- dracut-kdump-wait-for-target.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 dracut-kdump-wait-for-target.sh (limited to 'dracut-kdump-wait-for-target.sh') diff --git a/dracut-kdump-wait-for-target.sh b/dracut-kdump-wait-for-target.sh new file mode 100755 index 0000000..ce984d0 --- /dev/null +++ b/dracut-kdump-wait-for-target.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# only wait if it's kdump kernel +if [ -f /etc/fadump.initramfs ] && [ ! -f /proc/device-tree/rtas/ibm,kernel-dump ]; then + exit 0 +fi + +. /lib/dracut-lib.sh +. /lib/kdump-lib-initramfs.sh + +# For SSH/NFS target, need to wait for the network to setup +if is_nfs_dump_target; then + get_host_ip + exit $? +fi + +if is_ssh_dump_target; then + get_host_ip + exit $? +fi + +# No need to wait for dump target +exit 0 -- cgit v1.2.3