touch /var/log/lastlog
touch /tmp/resolv.conf.auto
ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
- grep -q debugfs /proc/filesystems && mount -t debugfs debugfs /sys/kernel/debug
+ grep -q debugfs /proc/filesystems && mount -o noatime -t debugfs debugfs /sys/kernel/debug
[ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
load_modules /etc/modules.d/*
START=39
start() {
[ -d /proc/bus/usb ] && {
- /bin/mount -t usbfs none /proc/bus/usb
+ mount -o noatime -t usbfs none /proc/bus/usb
}
}
no_fo_mount_jffs() {
# initialize jffs2
- mount "$mtdpart" /overlay -t jffs2 || exit
-
+ mount -o noatime "$mtdpart" /overlay -t jffs2 || exit
+
# workaround to ensure that union can attach properly
sync
ls /overlay >/dev/null
# Copyright (C) 2010 Vertical Communications
skip_if_rootfs_mounted() {
- mount "$mtdpart" /rom/overlay -t jffs2 || exit
+ mount -o noatime -t jffs2 "$mtdpart" /rom/overlay || exit
}
boot_hook_add switch2jffs skip_if_rootfs_mounted
debug () {
${DEBUG:-:} "$@"
}
-mount() {
- busybox mount "$@"
-}
# newline
N="
# Copyright (C) 2006-2010 OpenWrt.org
# Copyright (C) 2010 Vertical Communications
-mount() {
- /bin/busybox mount -o noatime "$@"
-}
-
boot_hook_splice_start() {
export -n PI_HOOK_SPLICE=1
}
}
pivot() { # <new_root> <old_root>
- mount -o move /proc $1/proc && \
+ mount -o noatime,move /proc $1/proc && \
pivot_root $1 $1$2 && {
- mount -o move $2/dev /dev
- mount -o move $2/tmp /tmp
- mount -o move $2/sys /sys 2>&-
- mount -o move $2/overlay /overlay 2>&-
+ mount -o noatime,move $2/dev /dev
+ mount -o noatime,move $2/tmp /tmp
+ mount -o noatime,move $2/sys /sys 2>&-
+ mount -o noatime,move $2/overlay /overlay 2>&-
return 0
}
}
root=$1
{
if grep -q overlay /proc/filesystems; then
- mount -t overlayfs -olowerdir=/,upperdir=$1 "overlayfs:$1" /mnt && root=/mnt
+ mount -o noatime,lowerdir=/,upperdir=$1 -t overlayfs "overlayfs:$1" /mnt && root=/mnt
elif grep -q mini_fo /proc/filesystems; then
- mount -t mini_fo -o base=/,sto=$1 "mini_fo:$1" /mnt 2>&- && root=/mnt
+ mount -t mini_fo -o noatime,base=/,sto=$1 "mini_fo:$1" /mnt 2>&- && root=/mnt
else
- mount --bind / /mnt
- mount --bind -o union "$1" /mnt && root=/mnt
+ mount --bind -o noatime / /mnt
+ mount --bind -o noatime,union "$1" /mnt && root=/mnt
fi
} || {
[ "$3" = "1" ] && {
- mount | grep "on $1 type" 2>&- 1>&- || mount -o bind $1 $1
+ mount | grep "on $1 type" 2>&- 1>&- || mount -o noatime,bind $1 $1
dupe $1 $rom
}
}
ramoverlay() {
mkdir -p /tmp/root
- mount -t tmpfs -o mode=0755 root /tmp/root
+ mount -t tmpfs -o noatime,mode=0755 root /tmp/root
fopivot /tmp/root /rom 1
}
mount_no_mtd() {
mtd unlock rootfs
- mount -o remount,rw /dev/root /
+ mount -o noatime,remount,rw /dev/root /
}
check_for_mtd() {
# Copyright (C) 2010 Vertical Communications
do_mount_procfs() {
- mount -t proc proc /proc
+ mount -o noatime -t proc proc /proc
}
do_mount_sysfs() {
- mount -t sysfs sysfs /sys
+ mount -o noatime -tsysfs sysfs /sys
}
calc_tmpfs_size() {
do_mount_tmpfs() {
calc_tmpfs_size
- mount -t tmpfs -o size=$pi_size,nosuid,nodev,mode=1777 tmpfs /tmp
+ mount -o noatime -t tmpfs -o size=$pi_size,nosuid,nodev,mode=1777 tmpfs /tmp
}
boot_hook_add preinit_essential do_mount_procfs
local mnt="$(grep devtmpfs /proc/mounts)"
mnt="${mnt#* }"; mnt="${mnt%% *}"
- [ "$mnt" = "/dev" ] || mount -o move "$mnt" /dev
+ [ "$mnt" = "/dev" ] || mount -o noatime,move "$mnt" /dev
}
do_mount_devfs() {
- mount -t devfs devfs /dev
+ mount -o noatime -t devfs devfs /dev
}
do_mount_hotplug() {
- mount -t tmpfs -o mode=0755,size=512K tmpfs /dev
+ mount -t tmpfs -o noatime,mode=0755,size=512K tmpfs /dev
}
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() {
}
do_mount_devpts() {
- mount -t devpts devpts /dev/pts
+ mount -o noatime -t devpts devpts /dev/pts
}
boot_hook_add preinit_essential init_devpts
find_mount_jffs2() {
mkdir -p /tmp/overlay
- mount "$(find_mtd_part rootfs_data)" /tmp/overlay -t jffs2
+ mount -o noatime -t jffs2 "$(find_mtd_part rootfs_data)" /tmp/overlay
mtd -qq unlock rootfs_data
}
rootfs_pivot() {
check_skip || jffs2_not_mounted || {
echo "switching to jffs2"
- mount -o move /tmp/overlay /overlay 2>&-
+ mount -o noatime,move /tmp/overlay /overlay 2>&-
fopivot /overlay /rom && pi_mount_skip_next=true
}
}
pivot() { # <new_root> <old_root>
mount | grep "on $1 type" 2>&- 1>&- || mount -o bind $1 $1
mkdir -p $1$2 $1/proc $1/sys $1/dev $1/tmp $1/overlay && \
- mount -o move /proc $1/proc && \
+ mount -o noatime,move /proc $1/proc && \
pivot_root $1 $1$2 || {
umount $1 $1
return 1
}
- mount -o move $2/sys /sys
- mount -o move $2/dev /dev
- mount -o move $2/tmp /tmp
- mount -o move $2/overlay /overlay 2>&-
+ mount -o noatime,move $2/sys /sys
+ mount -o noatime,move $2/dev /dev
+ mount -o noatime,move $2/tmp /tmp
+ mount -o noatime,move $2/overlay /overlay 2>&-
return 0
}
umount -l /mnt
grep /overlay /proc/mounts > /dev/null && {
- mount -o remount,ro /overlay
+ mount -o noatime,remount,ro /overlay
umount -l /overlay
}
boot_run_hook jffs2reset
else
mtd erase "$partname"
- mount "$mtdpart" /overlay -t jffs2
+ mount -o noatime "$mtdpart" /overlay -t jffs2
fopivot /overlay /rom 1
fi
fi
#!/bin/sh
do_mount_procfs() {
- mount none /proc -t proc
+ mount -o noatime none /proc -t proc
}
echo "- init -"
[ -n "$SWITCH_ROOT_TMPFS" ] && {
- mount none /mnt -t tmpfs
+ mount -o noatime none /mnt -t tmpfs
( cd /; find -xdev -type d ) | ( cd /mnt; xargs mkdir -p )
find / \! -type d -xdev | tar -cT /proc/self/fd/0 | tar -xC /mnt
mkdir /mnt/proc /mnt/dev /mnt/tmp /mnt/sys
- mount -o move /proc /mnt/proc
- mount -o move /dev /mnt/dev
- mount -o move /tmp /mnt/tmp
- mount -o move /sys /mnt/sys
+ mount -o noatime,move /proc /mnt/proc
+ mount -o noatime,move /dev /mnt/dev
+ mount -o noatime,move /tmp /mnt/tmp
+ mount -o noatime,move /sys /mnt/sys
rm -rf /proc /dev /tmp /sys
exec switch_root -c /dev/console /mnt /sbin/init
}
COUNTER=0
while [ $COUNTER -lt 10 ]; do
sleep 1
- mount $rootfs /mnt
+ mount -o noatime $rootfs /mnt
[ $? -eq "0" ] && let COUNTER=100;
let COUNTER=COUNTER+1
done
unset rootfs
-mount -o move /proc /mnt/proc
-mount -o move /dev /mnt/dev
-mount -o move /dev/pts /mnt/dev/pts
-mount -o move /tmp /mnt/tmp
-mount -o move /sys /mnt/sys
-mount none /tmp -t tmpfs
+mount -o noatime,move /proc /mnt/proc
+mount -o noatime,move /dev /mnt/dev
+mount -o noatime,move /dev/pts /mnt/dev/pts
+mount -o noatime,move /tmp /mnt/tmp
+mount -o noatime,move /sys /mnt/sys
+mount -o noatime none /tmp -t tmpfs
killall -q hotplug2
exec switch_root -c /dev/console /mnt /sbin/init
# Copyright (C) 2010 Vertical Communications
do_mount_procfs() {
- mount -t proc none /proc
+ mount -o noatime -t proc none /proc
}
# Copyright (C) 2010 Vertical Communications
do_mount_procfs() {
- mount -t proc none /proc
+ mount -o noatime -t proc none /proc
}
-
-
do_mount_xenfs() {
[ -f /etc/modules.d/??-xenfs ] && {
insmod $(cat /etc/modules.d/??-xenfs)
- mount none /proc/xen -t xenfs
+ mount -o noatime none /proc/xen -t xenfs
}
}