From 6a91be99c71ae8a7937040579dd5129fb1bc3e31 Mon Sep 17 00:00:00 2001 From: jow Date: Sat, 24 Jul 2010 19:33:11 +0000 Subject: [package] base-files: localize variable in do_move_devtmpfs(), remove extra temporary variable and shorten conditional git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22380 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/base-files/files/lib/preinit/20_device_fs_mount | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'package/base-files/files') diff --git a/package/base-files/files/lib/preinit/20_device_fs_mount b/package/base-files/files/lib/preinit/20_device_fs_mount index 6ba7ccc6f..283aa0a9d 100644 --- a/package/base-files/files/lib/preinit/20_device_fs_mount +++ b/package/base-files/files/lib/preinit/20_device_fs_mount @@ -3,13 +3,10 @@ # Copyright (C) 2010 Vertical Communications do_move_devtmpfs() { - foo="`grep devtmpfs /proc/mounts`" - x=${foo#* } - x=${x%% *} + local mnt="$(grep devtmpfs /proc/mounts)" + mnt="${mnt#* }"; mnt="${mnt%% *}" - if [ "$x" != "/dev" ] ; then - mount -o move "$x" /dev - fi + [ "$mnt" = "/dev" ] || mount -o move "$mnt" /dev } do_mount_devfs() { -- cgit v1.2.3