Skip to contentSkip to conversation

initramfs-framework: Allow directories with spaces

PATCH New Otavio Salvador 1 participant 1 message Sep 11, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 initramfs-framework: Allow directories with spaces

When mdev module loads the Linux kernel modules, it can visit directories with spaces. To allow that, we must quote the variable otherwise it misunderstand it arguments as multiple entries.

Fixes:

,----

| Freeing unused kernel memory: 3072K (80d00000 - 81000000)
| cat: can't open '/sys/devices/platform/Vivante': No such file or directory
| cat: can't open 'GCCore/modalias': No such file or directory

`----

---

 meta/recipes-core/initrdscripts/initramfs-framework/mdev | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/initrdscripts/initramfs-framework/mdev +2 -2
index a5df1d717a..9814d9764a 100644
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2011 O.S. Systems Software LTDA.
+# Copyright (C) 2011, 2017 O.S. Systems Software LTDA.
 # Licensed on MIT
 
 mdev_enabled() {
@@ -25,6 +25,6 @@ mdev_run() {
 
 	# load modules for devices
 	find /sys -name modalias | while read m; do
-		load_kernel_module $(cat $m)
+		load_kernel_module $(cat "$m")
 	done
 }
Signature · 1 line
2.14.1