summaryrefslogtreecommitdiffstats
path: root/0071-dracut.sh-turn-off-hostonly-mode-if-udev-database-is.patch
blob: 88d2ed921c0cb470ba29c21e7c910367b6c957ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 78d1d4f86d8c8ad01cfa21be41852ee52db78bed Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 20 Mar 2013 10:25:23 +0100
Subject: [PATCH] dracut.sh: turn off hostonly mode, if udev database is not
 found

---
 dracut.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dracut.sh b/dracut.sh
index 9afa694..0a87cca 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -788,6 +788,10 @@ if [[ $hostonly ]]; then
             unset hostonly
         fi
     done
+    if ! [[ -d /run/udev/data ]]; then
+        dwarning "Turning off host-only mode: udev database not found!"
+        unset hostonly
+    fi
 fi
 
 declare -A host_fs_types