summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2006-07-02 18:57:07 +0200
committermaximilian attems <maks@debian.org>2006-07-02 18:57:07 +0200
commit0d341b8d32810844ce035e89a9e60fb7a7dde4b6 (patch)
tree55a7b2d2fe9e9cde049c1e7962b3baef00107c5b /scripts/functions
parent09276c4c9f7deb9a46cf162747b5749f94738c2b (diff)
woow pile of stuff turned up:
- cleanup of activate_vg() in lvm boot script - use less of busybox utilities - conf.d for BUSYBOX=y usage for the packages - don't poke on conffile for RESUME - use printf instead of expr (ooh ash and dash are *fun*) - fix update-initramfs to use current_version when no other version exists around
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions16
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/functions b/scripts/functions
index a4faaa8..fea6956 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -220,14 +220,16 @@ load_modules()
{
if [ -e /conf/modules ]; then
cat /conf/modules | while read m; do
- if [ -z "$m" ] \
- || expr "$m" : "#" >/dev/null \
- || expr "$m" : "[ \t]+#?" > /dev/null
- then
- continue;
- else
- modprobe -q $m
+ # Skip empty lines
+ if [ -z "$m" ]; then
+ continue
fi
+ # Skip comments - d?ash removes whitespace prefix
+ com=$(printf "%.1s" "${m}")
+ if [ "$com" = "#" ]; then
+ continue
+ fi
+ modprobe -q $m
done
fi
}