diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-07-24 19:33:11 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-07-24 19:33:11 +0000 |
commit | 56d7649922e5264dfb4ccb216ff67cfe3c7ffd3e (patch) | |
tree | 73126cc4962451a1fb085072ca155a2810e3ce3f /package/base-files/files/lib/preinit/20_device_fs_mount | |
parent | 01838d26e9db0a4c149fe736c535fc730a38fdb5 (diff) | |
download | master-187ad058-56d7649922e5264dfb4ccb216ff67cfe3c7ffd3e.tar.gz master-187ad058-56d7649922e5264dfb4ccb216ff67cfe3c7ffd3e.tar.bz2 master-187ad058-56d7649922e5264dfb4ccb216ff67cfe3c7ffd3e.zip |
[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
Diffstat (limited to 'package/base-files/files/lib/preinit/20_device_fs_mount')
-rw-r--r-- | package/base-files/files/lib/preinit/20_device_fs_mount | 9 |
1 files changed, 3 insertions, 6 deletions
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() { |