1
0
Fork 0
quarks/sys-kernel/dracut/files/026-0004-lsinitrd.sh-fix-fo...

43 lines
1.2 KiB
Diff

From f6e0e5653fac1f856192bfafdcb2fbd86ed8a22a Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Sun, 10 Mar 2013 14:44:32 +0100
Subject: [PATCH 3/5] lsinitrd.sh: fix for default initrd not found, but image
given
---
lsinitrd.sh | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/lsinitrd.sh b/lsinitrd.sh
index 7a09423..4b8a7e2 100755
--- a/lsinitrd.sh
+++ b/lsinitrd.sh
@@ -54,16 +54,17 @@ if [[ "$1" ]]; then
usage
exit 1
fi
-fi
-
-[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
-
-if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then
- image="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
else
- image="/boot/initramfs-${KERNEL_VERSION}.img}"
+ [[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
+
+ if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then
+ image="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
+ else
+ image="/boot/initramfs-${KERNEL_VERSION}.img}"
+ fi
fi
+
if ! [[ -f "$image" ]]; then
{
echo "No <initramfs file> specified and the default image '$image' cannot be accessed!"
--
1.8.1.4