]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
50drm: fix ambiguous redirects
authorNicolas Chauvet <kwizart@gmail.com>
Sat, 26 Sep 2020 12:50:31 +0000 (14:50 +0200)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Mon, 28 Sep 2020 21:08:12 +0000 (21:08 +0000)
If i contains a space, there is a need to protect the variable usage in some cases.

This will occurs when a next patch will enable platform bus with such case:
'/sys/bus/platform/devices/Fixed MDIO bus.0'

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
modules.d/50drm/module-setup.sh

index c69b2cfa840dccebea4aa0707997a2730ce43f84..81d2e66258d552db662c686fdab9c499284968f9 100755 (executable)
@@ -33,8 +33,8 @@ installkernel() {
     if [[ $hostonly ]]; then
         for i in /sys/bus/{pci/devices,virtio/devices,soc/devices/soc?}/*/modalias; do
             [[ -e $i ]] || continue
-            if hostonly="" dracut_instmods --silent -s "drm_crtc_init|drm_dev_register" -S "iw_handler_get_spy" $(<$i); then
-                if strstr "$(modinfo -F filename $(<$i) 2>/dev/null)" radeon.ko; then
+            if hostonly="" dracut_instmods --silent -s "drm_crtc_init|drm_dev_register" -S "iw_handler_get_spy" $(<"$i"); then
+                if strstr "$(modinfo -F filename $(<"$i") 2>/dev/null)" radeon.ko; then
                     hostonly='' instmods amdkfd
                 fi
             fi