summaryrefslogtreecommitdiffstats
path: root/0064-51-dracut-rescue-postinst.sh-add-extra-checks.patch
diff options
context:
space:
mode:
Diffstat (limited to '0064-51-dracut-rescue-postinst.sh-add-extra-checks.patch')
-rw-r--r--0064-51-dracut-rescue-postinst.sh-add-extra-checks.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/0064-51-dracut-rescue-postinst.sh-add-extra-checks.patch b/0064-51-dracut-rescue-postinst.sh-add-extra-checks.patch
new file mode 100644
index 0000000..9f060d1
--- /dev/null
+++ b/0064-51-dracut-rescue-postinst.sh-add-extra-checks.patch
@@ -0,0 +1,23 @@
+From 619c1bb334ea28fb2f096640d6127b6bfb2a0c8b Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald@redhat.com>
+Date: Tue, 19 Mar 2013 16:56:56 +0100
+Subject: [PATCH] 51-dracut-rescue-postinst.sh: add extra checks
+
+---
+ 51-dracut-rescue-postinst.sh | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/51-dracut-rescue-postinst.sh b/51-dracut-rescue-postinst.sh
+index 21208a4..d206496 100755
+--- a/51-dracut-rescue-postinst.sh
++++ b/51-dracut-rescue-postinst.sh
+@@ -10,6 +10,9 @@ KERNEL_IMAGE="$2"
+ [[ -f /etc/os-release ]] && . /etc/os-release
+ [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
+
++[[ $MACHINE_ID ]] || exit 1
++[[ -f $KERNEL_IMAGE ]] || exit 1
++
+ INITRDFILE="/boot/initramfs-${MACHINE_ID}-rescue.img"
+ [[ -f $INITRDFILE ]] && exit 0
+