summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2009-06-23 14:09:40 +0200
committermaximilian attems <maks@debian.org>2009-06-23 14:12:18 +0200
commitdd16e2d08faed5bc36616c62f9275f5c03527fd1 (patch)
tree8e3974e7c638beb4f9195fdaea85e77ae85db9b6
parent71ef55e707383818e7a4fe09f02ead7e63dd0d88 (diff)
downloadinitramfs-tools-dd16e2d08faed5bc36616c62f9275f5c03527fd1.tar.gz
initramfs-tools-dd16e2d08faed5bc36616c62f9275f5c03527fd1.zip
hook-functions: Fix loading of entries without newline in /etc/i-t/modules
don't use the overcomplicated sed to add a newline to really strip it, just use the simple /etc/init.d/module-init-tools parsing that should be well enough tested. ;) (closes: #532745) Signed-off-by: maximilian attems <maks@debian.org>
-rw-r--r--hook-functions5
1 files changed, 3 insertions, 2 deletions
diff --git a/hook-functions b/hook-functions
index 6b2e3e4..f0b310f 100644
--- a/hook-functions
+++ b/hook-functions
@@ -33,8 +33,9 @@ add_modules_from_file()
return
fi
- sed -e '/^#/d' ${1} | while read module rest; do
- force_load "${module}" "${rest}"
+ grep '^[^#]' ${1} | while read module args; do
+ [ -n "$module" ] || continue
+ force_load "${module}" "${args}"
done
}