summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-08-07 16:17:01 +0200
committerDave Reisner <dreisner@archlinux.org>2011-09-27 12:18:04 +0200
commit84226d26c065b3c1eb6f2dcf551f416d284278d5 (patch)
tree585bc83d383930e3b3bc08e315d5376be523b55c /functions
parent111abbd9fcab6b50ee43329f19560b674c6ac97f (diff)
downloadmkinitcpio-84226d26c065b3c1eb6f2dcf551f416d284278d5.tar.gz
mkinitcpio-84226d26c065b3c1eb6f2dcf551f416d284278d5.tar.xz
functions: specify the delimiter to xargs
Without specifying this, xargs will split arguments on whitespace as well as newlines, and will interpret quoting and backslashes. When the delimiter is specified, every character is taken literally and only the given delimiter in honored. This sidesteps issues with broken modalias files as evidenced by a MacBookAir3,1 or the bbs thread below: https://bbs.archlinux.org/viewtopic.php?pid=971853 Also fixes FS#25450. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'functions')
-rw-r--r--functions3
1 files changed, 2 insertions, 1 deletions
diff --git a/functions b/functions
index 8ce24ea..8eef5b8 100644
--- a/functions
+++ b/functions
@@ -117,7 +117,8 @@ auto_modules() {
IFS=$'\n' read -rd '' -a mods < \
<(find /sys/devices -name modalias -exec sort -u {} + |
- xargs modprobe -d "$BASEDIR" -aRS "$KERNELVERSION" |
+ # delimit each input by a newline, expanded in place
+ xargs -d $'\n' modprobe -d "$BASEDIR" -aRS "$KERNELVERSION" |
sort -u)
printf "%s\n" "${mods[@]//-/_}"