From 0d341b8d32810844ce035e89a9e60fb7a7dde4b6 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 2 Jul 2006 18:57:07 +0200 Subject: 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 --- scripts/functions | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'scripts/functions') 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 } -- cgit v1.2.3