X-Original-To: alpine-devel@mail.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id CED7FDC0933 for ; Thu, 21 Apr 2016 07:05:06 +0000 (UTC) Received: from newmail.tetrasec.net (unknown [74.117.189.117]) by mail.alpinelinux.org (Postfix) with ESMTP id 9B40DDC0330 for ; Thu, 21 Apr 2016 07:05:06 +0000 (UTC) Received: from ncopa-desktop.alpinelinux.org (229.63.200.37.customer.cdi.no [37.200.63.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: n@tanael.org) by newmail.tetrasec.net (Postfix) with ESMTPSA id 3FD8F5A12F8; Thu, 21 Apr 2016 07:05:04 +0000 (GMT) Date: Thu, 21 Apr 2016 09:04:59 +0200 From: Natanael Copa To: Przemyslaw Pawelczyk Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] [PATCH] main/openrc: Fix sed script in modules.initd. Message-ID: <20160421090459.3b769125@ncopa-desktop.alpinelinux.org> In-Reply-To: <1461101344-3537-1-git-send-email-przemoc@zoho.com> References: <1461101344-3537-1-git-send-email-przemoc@zoho.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.28; x86_64-alpine-linux-musl) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP On Tue, 19 Apr 2016 23:29:04 +0200 Przemyslaw Pawelczyk wrote: > 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 > @@ -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 i rewrote it to be slightly more readable. Thanks! -nc --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---