summaryrefslogtreecommitdiffstats
path: root/load-modules.sh
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2010-01-12 21:18:57 +0100
committerThomas Bächler <thomas@archlinux.org>2010-01-12 21:18:57 +0100
commitcd0973a87d41a7a90808024861aff1af4d4d3096 (patch)
tree6a25bd713885f0fe00a08b299541a576209c4723 /load-modules.sh
parent54fd0322ae780c13ab2804489a30944ca08cfa88 (diff)
downloadmkinitcpio-cd0973a87d41a7a90808024861aff1af4d4d3096.tar.gz
mkinitcpio-cd0973a87d41a7a90808024861aff1af4d4d3096.tar.xz
Replace the custom 'replace' tool with 'sed'
Diffstat (limited to 'load-modules.sh')
-rwxr-xr-xload-modules.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/load-modules.sh b/load-modules.sh
index 21767ca..f703088 100755
--- a/load-modules.sh
+++ b/load-modules.sh
@@ -7,7 +7,7 @@
MODPROBE="/sbin/modprobe"
RESOLVEALIAS="/bin/resolve-modalias"
USEBLACKLIST="--use-blacklist"
-REPLACE="/bin/replace"
+SED="/bin/sed"
MODDEPS="/bin/moddeps"
if [ -f /proc/cmdline ]; then
@@ -19,12 +19,12 @@ if [ -f /proc/cmdline ]; then
done
#parse cmdline entries of the form "disablemodules=x,y,z"
if [ -n "${disablemodules}" ]; then
- BLACKLIST="$(${REPLACE} ${disablemodules} ',')"
+ BLACKLIST="$(echo "${disablemodules}" | ${SED} 's|,| |g')"
fi
fi
# sanitize the module names
-BLACKLIST="$(${REPLACE} "${BLACKLIST}" '-' '_')"
+BLACKLIST="$(echo "${BLACKLIST}" | ${SED} 's|-|_|g')"
if [ -n "${BLACKLIST}" ] ; then
# Try to find all modules for the alias