X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/cb108e4d04ee53aab2cae3886d80c107bbd361f0..437bd1772aceb2fc48ac5b11d68b366d0516715e:/package/base-files/files/lib/preinit/20_device_fs_mount 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 6ba7ccc6f..832b1cf39 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() { @@ -17,7 +14,7 @@ do_mount_devfs() { } do_mount_hotplug() { - mount -t tmpfs tmpfs /dev -o size=512K + mount -t tmpfs tmpfs /dev -o mode=0755,size=512K } do_mount_udev() {