summaryrefslogtreecommitdiff
path: root/dracut-kdump-wait-for-target.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dracut-kdump-wait-for-target.sh')
-rwxr-xr-xdracut-kdump-wait-for-target.sh23
1 files changed, 23 insertions, 0 deletions
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