From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5669B1381F3 for ; Tue, 18 Dec 2012 05:24:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2B37421C0A9; Tue, 18 Dec 2012 05:24:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9A96B21C0A9 for ; Tue, 18 Dec 2012 05:24:21 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9A8D633DAFC for ; Tue, 18 Dec 2012 05:24:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 302ECE543C for ; Tue, 18 Dec 2012 05:24:19 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1355808242.2c60282ba9d12040e82e6571c9df8aa1e3da36a2.vapier@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: init.d/ X-VCS-Repository: proj/openrc X-VCS-Files: init.d/fsck.in X-VCS-Directories: init.d/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 2c60282ba9d12040e82e6571c9df8aa1e3da36a2 X-VCS-Branch: master Date: Tue, 18 Dec 2012 05:24:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6e2c3996-0386-4778-aaa8-73500ea17e78 X-Archives-Hash: cd398ea4076a68d05148efeae8841ff4 commit: 2c60282ba9d12040e82e6571c9df8aa1e3da36a2 Author: Mike Frysinger gentoo org> AuthorDate: Thu May 17 03:46:21 2012 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Tue Dec 18 05:24:02 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=2c60282b fsck: simplify skiplist setup Use printf rather than a manual for loop. Signed-off-by: Mike Frysinger gentoo.org> --- init.d/fsck.in | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/init.d/fsck.in b/init.d/fsck.in index fcc334c..8322452 100644 --- a/init.d/fsck.in +++ b/init.d/fsck.in @@ -71,12 +71,10 @@ start() done if [ "$RC_UNAME" = Linux ]; then - local skiptypes x - for x in $net_fs_list $extra_net_fs_list; do - skiptypes="${skiptypes}no${x}," - done - skiptypes="${skiptypes}noopts=_netdev" - fsck_opts="$fsck_opts -C0 -T -t $skiptypes" + local skiptypes + skiptypes=$(printf 'no%s,' ${net_fs_list} ${extra_net_fs_list}) + [ "${skiptypes}" = "no," ] && skiptypes="" + fsck_opts="$fsck_opts -C0 -T -t ${skiptypes}noopts=_netdev" if [ -z "$fsck_passno" -a -z "$fsck_mnt" ]; then fsck_args=${fsck_args--A -p} if echo 2>/dev/null >/.test.$$; then