[package] base-files: localize variable in do_move_devtmpfs(), remove extra temporary...
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 24 Jul 2010 19:33:11 +0000 (19:33 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 24 Jul 2010 19:33:11 +0000 (19:33 +0000)
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

index 6ba7ccc..283aa0a 100644 (file)
@@ -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() {
This page took 0.026245 seconds and 4 git commands to generate.