Blame 0135-rescue-use-proper-path-for-0-rescue.conf.patch
|
Harald Hoyer |
53404a |
From b29901c083ba22a0794849c1e93afc40c11588a2 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
53404a |
From: Yu Watanabe <watanabe.yu+github@gmail.com>
|
|
Harald Hoyer |
53404a |
Date: Wed, 19 Oct 2016 12:22:48 +0900
|
|
Harald Hoyer |
53404a |
Subject: [PATCH] rescue: use proper path for 0-rescue.conf
|
|
Harald Hoyer |
53404a |
|
|
Harald Hoyer |
53404a |
---
|
|
Harald Hoyer |
53404a |
51-dracut-rescue.install | 7 +++----
|
|
Harald Hoyer |
53404a |
1 file changed, 3 insertions(+), 4 deletions(-)
|
|
Harald Hoyer |
53404a |
|
|
Harald Hoyer |
53404a |
diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install
|
|
Harald Hoyer |
53404a |
index 60d7372..0a5f14b 100755
|
|
Harald Hoyer |
53404a |
--- a/51-dracut-rescue.install
|
|
Harald Hoyer |
53404a |
+++ b/51-dracut-rescue.install
|
|
Harald Hoyer |
53404a |
@@ -59,16 +59,15 @@ if ! [[ ${BOOT_OPTIONS[*]} ]]; then
|
|
Harald Hoyer |
53404a |
exit 1
|
|
Harald Hoyer |
53404a |
fi
|
|
Harald Hoyer |
53404a |
|
|
Harald Hoyer |
53404a |
-LOADER_ENTRY="/boot/loader/entries/${MACHINE_ID}-0-rescue.conf"
|
|
Harald Hoyer |
53404a |
BOOT_DIR="/${MACHINE_ID}/0-rescue"
|
|
Harald Hoyer |
53404a |
+BOOT_ROOT=${BOOT_DIR_ABS%$BOOT_DIR}
|
|
Harald Hoyer |
53404a |
+LOADER_ENTRY="$BOOT_ROOT/loader/entries/${MACHINE_ID}-0-rescue.conf"
|
|
Harald Hoyer |
53404a |
|
|
Harald Hoyer |
53404a |
ret=0
|
|
Harald Hoyer |
53404a |
|
|
Harald Hoyer |
53404a |
case "$COMMAND" in
|
|
Harald Hoyer |
53404a |
add)
|
|
Harald Hoyer |
53404a |
- for i in "/boot/loader/entries/${MACHINE_ID}-0-rescue.conf"; do
|
|
Harald Hoyer |
53404a |
- [[ -f $i ]] && exit 0
|
|
Harald Hoyer |
53404a |
- done
|
|
Harald Hoyer |
53404a |
+ [[ -f "$LOADER_ENTRY" ]] && exit 0
|
|
Harald Hoyer |
53404a |
|
|
Harald Hoyer |
53404a |
# source our config dir
|
|
Harald Hoyer |
53404a |
for f in $(dropindirs_sort ".conf" "/etc/dracut.conf.d" "/usr/lib/dracut/dracut.conf.d"); do
|