1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-19 05:58:53 +02:00

base-files: localize variable in do_move_devtmpfs(), remove extra temporary variable and shorten conditional

SVN-Revision: 22380
This commit is contained in:
Jo-Philipp Wich 2010-07-24 19:33:11 +00:00
parent 6a85a3b53b
commit 9bf9ea9802

@ -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() {