projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
base-files: add mtd_get_mac_{ascii,binary} helpers
[openwrt.git]
/
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 1f049dade0bc0fe26fa43ec8121f83569eca0ed7..7535b3ff9da6a1f41f525c1d51625d5197160cec 100644
(file)
--- a/
package/base-files/files/lib/preinit/20_device_fs_mount
+++ b/
package/base-files/files/lib/preinit/20_device_fs_mount
@@
-2,20
+2,29
@@
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2010 Vertical Communications
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2010 Vertical Communications
+do_move_devtmpfs() {
+ local mnt="$(grep devtmpfs /proc/mounts)"
+ mnt="${mnt#* }"; mnt="${mnt%% *}"
+
+ [ "$mnt" = "/dev" ] || mount -o noatime,move "$mnt" /dev
+}
+
do_mount_devfs() {
do_mount_devfs() {
- mount
devfs /dev -t devfs
+ mount
-o noatime -t devfs devfs /dev
}
do_mount_hotplug() {
}
do_mount_hotplug() {
- mount -t tmpfs
tmpfs /dev -o size=512K
+ mount -t tmpfs
-o noatime,mode=0755,size=512K tmpfs /dev
}
do_mount_udev() {
}
do_mount_udev() {
- mount -n -t tmpfs -o mode=0755 udev /dev
+ mount -n -t tmpfs -o
noatime,
mode=0755 udev /dev
}
choose_device_fs() {
}
choose_device_fs() {
- if grep devfs /proc/filesystems; then
+ if grep -q devtmpfs /proc/mounts; then
+ do_move_devtmpfs
+ elif grep -q devfs /proc/filesystems; then
do_mount_devfs
elif [ -x /sbin/hotplug2 ]; then
do_mount_hotplug
do_mount_devfs
elif [ -x /sbin/hotplug2 ]; then
do_mount_hotplug