aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib/functions/boot.sh
diff options
context:
space:
mode:
authorMirko Vogt <mirko@openwrt.org>2012-12-19 16:07:46 +0000
committerMirko Vogt <mirko@openwrt.org>2012-12-19 16:07:46 +0000
commitfd18877418cf14f6bc2b413a238a3ca5f6d9ad94 (patch)
treeb94fb7ac00524d0705ef8265df341a2a596e7a20 /package/base-files/files/lib/functions/boot.sh
parent667779e4f8fa3749d0867908c4bae53b0471e961 (diff)
downloadupstream-fd18877418cf14f6bc2b413a238a3ca5f6d9ad94.tar.gz
upstream-fd18877418cf14f6bc2b413a238a3ca5f6d9ad94.tar.bz2
upstream-fd18877418cf14f6bc2b413a238a3ca5f6d9ad94.zip
Do not overload mount-call - trying to reduce confusion
The behaviour of calling 'mount' differed depending on whether it called the busybox-mount, the mount of util-linux, the mount defined in /lib/functions.sh and /lib/functions/boot.sh /etc/preinit even included /lib/functions.sh and /lib/functions/boot.sh, both re-defining 'mount'. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34792 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/lib/functions/boot.sh')
-rw-r--r--package/base-files/files/lib/functions/boot.sh26
1 files changed, 11 insertions, 15 deletions
diff --git a/package/base-files/files/lib/functions/boot.sh b/package/base-files/files/lib/functions/boot.sh
index 8c3f27ba4f..137c3bf476 100644
--- a/package/base-files/files/lib/functions/boot.sh
+++ b/package/base-files/files/lib/functions/boot.sh
@@ -2,10 +2,6 @@
# 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
}
@@ -112,12 +108,12 @@ dupe() { # <new_root> <old_root>
}
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
}
}
@@ -126,16 +122,16 @@ fopivot() { # <rw_root> <ro_root> <dupe?>
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
}
}
@@ -144,7 +140,7 @@ fopivot() { # <rw_root> <ro_root> <dupe?>
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
}