From f5891c781145ad2a9e629a74b4593c1615dcd113 Mon Sep 17 00:00:00 2001 From: illiliti Date: Wed, 5 Feb 2020 21:03:23 +0300 Subject: [PATCH] prevent shell expansion --- config | 4 ++-- generate | 4 ++-- init | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config b/config index 93e72c7..5325613 100644 --- a/config +++ b/config @@ -3,7 +3,7 @@ # # debug mode -#debug=1 +debug=1 # parse fstab #use_fstab=0 @@ -21,7 +21,7 @@ root="UUID=07729c48-25d8-4096-acaf-ce5322915680" devmgr="mdev" # hostonly mode -#hostonly=1 +hostonly=1 # drivers #drivers="" diff --git a/generate b/generate index efb6b95..20a83fb 100755 --- a/generate +++ b/generate @@ -126,12 +126,12 @@ install_drivers() { if [ "$hostonly" = 1 ]; then [ -n "$root_type" ] || panic "hostonly mode required root_type option to be configured" for modalias in $(find /sys/devices -name modalias -exec sort -u "{}" "+"); do - for driver in $(modprobe -D $modalias 2>/dev/null | cut -d " " -f 2); do + for driver in $(modprobe -D "$modalias" 2>/dev/null | cut -d " " -f 2); do install -Dm644 "$driver" "${tmpdir}${driver}" done done - for root_driver in $(modprobe -D $root_type 2>/dev/null | cut -d " " -f 2); do + for root_driver in $(modprobe -D "$root_type" 2>/dev/null | cut -d " " -f 2); do install -Dm644 "$root_driver" "${tmpdir}${root_driver}" done diff --git a/init b/init index fbe8423..69ca2a1 100644 --- a/init +++ b/init @@ -39,7 +39,7 @@ use_mdev() { done # load drivers - find /sys -name "modalias" -type f -exec sort -u "{}" + | xargs modprobe -ba + find /sys -name "modalias" -type f -exec sort -u "{}" "+" | xargs modprobe -ba } # setup mdevd