aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib/functions.sh
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-12-27 21:15:09 +0000
committerJohn Crispin <blogic@openwrt.org>2013-12-27 21:15:09 +0000
commit41d0bfcc1f6d3dd952ebf31261367c4f4dfe557b (patch)
tree64f173fd7ee06ef5b515da6ddc829b4e5d8dd231 /package/base-files/files/lib/functions.sh
parentc18a4e048c79b23918e6a550e722629295fcf80e (diff)
downloadupstream-41d0bfcc1f6d3dd952ebf31261367c4f4dfe557b.tar.gz
upstream-41d0bfcc1f6d3dd952ebf31261367c4f4dfe557b.tar.bz2
upstream-41d0bfcc1f6d3dd952ebf31261367c4f4dfe557b.zip
base-files: fix mount-utils incompatibility
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39169 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/lib/functions.sh')
-rwxr-xr-xpackage/base-files/files/lib/functions.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index 6f23e0b8b2..e7ca02a655 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -568,12 +568,12 @@ dupe() { # <new_root> <old_root>
}
pivot() { # <new_root> <old_root>
- mount -o noatime,move /proc $1/proc && \
+ /bin/mount -o noatime,move /proc $1/proc && \
pivot_root $1 $1$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>&-
+ /bin/mount -o noatime,move $2/dev /dev
+ /bin/mount -o noatime,move $2/tmp /tmp
+ /bin/mount -o noatime,move $2/sys /sys 2>&-
+ /bin/mount -o noatime,move $2/overlay /overlay 2>&-
return 0
}
}
@@ -582,16 +582,16 @@ fopivot() { # <rw_root> <ro_root> <dupe?>
root=$1
{
if grep -q overlay /proc/filesystems; then
- mount -o noatime,lowerdir=/,upperdir=$1 -t overlayfs "overlayfs:$1" /mnt && root=/mnt
+ /bin/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 noatime,base=/,sto=$1 "mini_fo:$1" /mnt 2>&- && root=/mnt
+ /bin/mount -t mini_fo -o noatime,base=/,sto=$1 "mini_fo:$1" /mnt 2>&- && root=/mnt
else
- mount --bind -o noatime / /mnt
- mount --bind -o noatime,union "$1" /mnt && root=/mnt
+ /bin/mount --bind -o noatime / /mnt
+ /bin/mount --bind -o noatime,union "$1" /mnt && root=/mnt
fi
} || {
[ "$3" = "1" ] && {
- mount | grep "on $1 type" 2>&- 1>&- || mount -o noatime,bind $1 $1
+ /bin/mount | grep "on $1 type" 2>&- 1>&- || /bin/mount -o noatime,bind $1 $1
dupe $1 $rom
}
}
@@ -600,7 +600,7 @@ fopivot() { # <rw_root> <ro_root> <dupe?>
ramoverlay() {
mkdir -p /tmp/root
- mount -t tmpfs -o noatime,mode=0755 root /tmp/root
+ /bin/mount -t tmpfs -o noatime,mode=0755 root /tmp/root
fopivot /tmp/root /rom 1
}