Blame 0053-dracut-initramfs-restore-make-mount-error-nonfatal.patch
|
Harald Hoyer |
bb31e7 |
From da5304aabcb7c1b541a8eeabc69627f05ad47c09 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
bb31e7 |
From: Alexander Tsoy <alexander@tsoy.me>
|
|
Harald Hoyer |
bb31e7 |
Date: Tue, 28 Jul 2015 14:55:59 +0300
|
|
Harald Hoyer |
bb31e7 |
Subject: [PATCH] dracut-initramfs-restore: make mount error nonfatal
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
Script enables errexit option (set -e). So if /boot is not a mount point
|
|
Harald Hoyer |
bb31e7 |
or is already mounted, then script dies after unsuccessful mount
|
|
Harald Hoyer |
bb31e7 |
command. Fix this by always returning successful result.
|
|
Harald Hoyer |
bb31e7 |
---
|
|
Harald Hoyer |
bb31e7 |
dracut-initramfs-restore.sh | 2 +-
|
|
Harald Hoyer |
bb31e7 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
diff --git a/dracut-initramfs-restore.sh b/dracut-initramfs-restore.sh
|
|
Harald Hoyer |
bb31e7 |
index 0e6a1a8..0c41a59 100644
|
|
Harald Hoyer |
bb31e7 |
--- a/dracut-initramfs-restore.sh
|
|
Harald Hoyer |
bb31e7 |
+++ b/dracut-initramfs-restore.sh
|
|
Harald Hoyer |
bb31e7 |
@@ -14,7 +14,7 @@ SKIP="$dracutbasedir/skipcpio"
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
-mount -o ro /boot &>/dev/null
|
|
Harald Hoyer |
bb31e7 |
+mount -o ro /boot &>/dev/null || true
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
if [[ $MACHINE_ID ]] && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]] ; then
|
|
Harald Hoyer |
bb31e7 |
IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
|