24 lines
764 B
Diff
24 lines
764 B
Diff
|
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
|
||
|
|