4413d3ae96
- fix rescue image naming Resolves: rhbz#923439 - turn off host-only mode if essential system filesystems not mounted - turn off host-only mode if udev database is not accessible
31 lines
826 B
Diff
31 lines
826 B
Diff
From 5bfa3b363a35fb5586f015701832eab5544385bf Mon Sep 17 00:00:00 2001
|
|
From: Harald Hoyer <harald@redhat.com>
|
|
Date: Wed, 20 Mar 2013 10:22:41 +0100
|
|
Subject: [PATCH] dracut.sh: turn off host-only mode, if essential system
|
|
filesystems not mounted
|
|
|
|
---
|
|
dracut.sh | 9 +++++++++
|
|
1 file changed, 9 insertions(+)
|
|
|
|
diff --git a/dracut.sh b/dracut.sh
|
|
index 7728712..9afa694 100755
|
|
--- a/dracut.sh
|
|
+++ b/dracut.sh
|
|
@@ -781,6 +781,15 @@ fi
|
|
# Need to be able to have non-root users read stuff (rpcbind etc)
|
|
chmod 755 "$initdir"
|
|
|
|
+if [[ $hostonly ]]; then
|
|
+ for i in /sys /proc /run /dev; do
|
|
+ if ! findmnt "$i" &>/dev/null; then
|
|
+ dwarning "Turning off host-only mode: '$i' is not mounted!"
|
|
+ unset hostonly
|
|
+ fi
|
|
+ done
|
|
+fi
|
|
+
|
|
declare -A host_fs_types
|
|
|
|
for line in "${fstab_lines[@]}"; do
|