Blame 0064-51-dracut-rescue-postinst.sh-add-extra-checks.patch

Harald Hoyer 4413d3
From 619c1bb334ea28fb2f096640d6127b6bfb2a0c8b Mon Sep 17 00:00:00 2001
Harald Hoyer 4413d3
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 4413d3
Date: Tue, 19 Mar 2013 16:56:56 +0100
Harald Hoyer 4413d3
Subject: [PATCH] 51-dracut-rescue-postinst.sh: add extra checks
Harald Hoyer 4413d3
Harald Hoyer 4413d3
---
Harald Hoyer 4413d3
 51-dracut-rescue-postinst.sh | 3 +++
Harald Hoyer 4413d3
 1 file changed, 3 insertions(+)
Harald Hoyer 4413d3
Harald Hoyer 4413d3
diff --git a/51-dracut-rescue-postinst.sh b/51-dracut-rescue-postinst.sh
Harald Hoyer 4413d3
index 21208a4..d206496 100755
Harald Hoyer 4413d3
--- a/51-dracut-rescue-postinst.sh
Harald Hoyer 4413d3
+++ b/51-dracut-rescue-postinst.sh
Harald Hoyer 4413d3
@@ -10,6 +10,9 @@ KERNEL_IMAGE="$2"
Harald Hoyer 4413d3
 [[ -f /etc/os-release ]] && . /etc/os-release
Harald Hoyer 4413d3
 [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
Harald Hoyer 4413d3
 
Harald Hoyer 4413d3
+[[ $MACHINE_ID ]] || exit 1
Harald Hoyer 4413d3
+[[ -f $KERNEL_IMAGE ]] || exit 1
Harald Hoyer 4413d3
+
Harald Hoyer 4413d3
 INITRDFILE="/boot/initramfs-${MACHINE_ID}-rescue.img"
Harald Hoyer 4413d3
 [[ -f $INITRDFILE ]] && exit 0
Harald Hoyer 4413d3