mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-17 04:14:39 +00:00
base-files: localize variable in do_move_devtmpfs(), remove extra temporary variable and shorten conditional
SVN-Revision: 22380
This commit is contained in:
parent
6a85a3b53b
commit
9bf9ea9802
@ -3,13 +3,10 @@
|
|||||||
# Copyright (C) 2010 Vertical Communications
|
# Copyright (C) 2010 Vertical Communications
|
||||||
|
|
||||||
do_move_devtmpfs() {
|
do_move_devtmpfs() {
|
||||||
foo="`grep devtmpfs /proc/mounts`"
|
local mnt="$(grep devtmpfs /proc/mounts)"
|
||||||
x=${foo#* }
|
mnt="${mnt#* }"; mnt="${mnt%% *}"
|
||||||
x=${x%% *}
|
|
||||||
|
|
||||||
if [ "$x" != "/dev" ] ; then
|
[ "$mnt" = "/dev" ] || mount -o move "$mnt" /dev
|
||||||
mount -o move "$x" /dev
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_mount_devfs() {
|
do_mount_devfs() {
|
||||||
|
Loading…
Reference in New Issue
Block a user