From dd16e2d08faed5bc36616c62f9275f5c03527fd1 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 23 Jun 2009 14:09:40 +0200 Subject: 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 --- hook-functions | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'hook-functions') 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 } -- cgit v1.2.3