Mail archive
alpine-devel

[alpine-devel] [PATCH] main/openrc: Fix sed script in modules.initd.

From: Przemyslaw Pawelczyk <przemoc_at_zoho.com>
Date: Tue, 19 Apr 2016 23:29:04 +0200

Old sed script did not remove blank lines, so one could easily get:

    modprobe: ERROR: missing parameters. See -h.

during boot, e.g. from comment in /etc/modules-load.d/lm_sensors.conf
generated by sensors-detect (from lm_sensors-detect package).
---
 main/openrc/modules.initd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main/openrc/modules.initd b/main/openrc/modules.initd
index a9829f4..8d94f97 100644
--- a/main/openrc/modules.initd
+++ b/main/openrc/modules.initd
_at_@ -19,7 +19,7 @@ start() {
 			continue
 		fi
 
-		sed 's/\#.*//g' < "$f" | while read module args; do
+		sed 's/\#.*//g;/^[[:space:]]*$/d' < "$f" | while read module args; do
 			modprobe -q $module $args
 		done
 	done
-- 
2.6.6
---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Tue Apr 19 2016 - 23:29:04 UTC