From: Jo-Philipp Wich Date: Sat, 24 Jul 2010 19:33:11 +0000 (+0000) Subject: base-files: localize variable in do_move_devtmpfs(), remove extra temporary variable... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9bf9ea98021946eea67331745472546be8d600fb;p=openwrt%2Fstaging%2Fjow.git base-files: localize variable in do_move_devtmpfs(), remove extra temporary variable and shorten conditional SVN-Revision: 22380 --- 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 6ba7ccc6f1..283aa0a9d1 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() {