From 2c60282ba9d12040e82e6571c9df8aa1e3da36a2 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 16 May 2012 23:46:21 -0400 Subject: [PATCH] fsck: simplify skiplist setup Use printf rather than a manual for loop. Signed-off-by: Mike Frysinger --- init.d/fsck.in | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/init.d/fsck.in b/init.d/fsck.in index fcc334c5..83224522 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