diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-05-16 23:46:21 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-12-18 00:24:02 -0500 |
commit | 2c60282ba9d12040e82e6571c9df8aa1e3da36a2 (patch) | |
tree | acfaf51511ae8317c9385ec033174b8769b68789 | |
parent | 8d61d03e277c97cea5e449212baf5a6609ddef2c (diff) |
fsck: simplify skiplist setup
Use printf rather than a manual for loop.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r-- | 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 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 |