about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJuan RP <xtraeme@voidlinux.eu>2015-05-08 17:55:36 +0200
committerJuan RP <xtraeme@voidlinux.eu>2015-05-08 17:55:36 +0200
commit0493378c0c2120979987b2ee64c5c5eb34a6fc7f (patch)
tree4571e97d0aa75829d11fa8148b30d72a026c0d83
parent30d9ebece4de59572c1c8c71950154faf4cb154b (diff)
downloadhrmpf-0493378c0c2120979987b2ee64c5c5eb34a6fc7f.tar.gz
hrmpf-0493378c0c2120979987b2ee64c5c5eb34a6fc7f.tar.xz
hrmpf-0493378c0c2120979987b2ee64c5c5eb34a6fc7f.zip
dracut: only install memdisk stuff if /usr/bin/memdiskfind exists.
-rw-r--r--dracut/module-setup.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/dracut/module-setup.sh b/dracut/module-setup.sh
index c6d1661..df148f5 100644
--- a/dracut/module-setup.sh
+++ b/dracut/module-setup.sh
@@ -15,11 +15,13 @@ install() {
     inst /usr/bin/chmod
     inst /usr/bin/sed
 
-    inst /usr/bin/memdiskfind
-    instmods mtdblock phram
-    inst_rules "$moddir/59-mtd.rules" "$moddir/61-mtd.rules"
-    prepare_udev_rules 59-mtd.rules 61-mtd.rules
-    inst_hook pre-udev 01 "$moddir/mtd.sh"
+    if [ -e /usr/bin/memdiskfind ]; then
+        inst /usr/bin/memdiskfind
+        instmods mtdblock phram
+        inst_rules "$moddir/59-mtd.rules" "$moddir/61-mtd.rules"
+        prepare_udev_rules 59-mtd.rules 61-mtd.rules
+        inst_hook pre-udev 01 "$moddir/mtd.sh"
+    fi
 
     inst_hook pre-pivot 01 "$moddir/adduser.sh"
     inst_hook pre-pivot 02 "$moddir/display-manager-autologin.sh"