diff options
author | John Crispin <blogic@openwrt.org> | 2013-12-27 21:15:09 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-12-27 21:15:09 +0000 |
commit | 41d0bfcc1f6d3dd952ebf31261367c4f4dfe557b (patch) | |
tree | 64f173fd7ee06ef5b515da6ddc829b4e5d8dd231 /package/base-files/files/lib/upgrade/common.sh | |
parent | c18a4e048c79b23918e6a550e722629295fcf80e (diff) | |
download | upstream-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/upgrade/common.sh')
-rw-r--r-- | package/base-files/files/lib/upgrade/common.sh | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index 15ee70325b..824a099801 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -34,18 +34,18 @@ install_bin() { # <file> [ <symlink> ... ] } supivot() { # <new_root> <old_root> - mount | grep "on $1 type" 2>&- 1>&- || mount -o bind $1 $1 + /bin/mount | grep "on $1 type" 2>&- 1>&- || /bin/mount -o bind $1 $1 mkdir -p $1$2 $1/proc $1/sys $1/dev $1/tmp $1/overlay && \ - mount -o noatime,move /proc $1/proc && \ + /bin/mount -o noatime,move /proc $1/proc && \ pivot_root $1 $1$2 || { - umount -l $1 $1 + /bin/umount -l $1 $1 return 1 } - 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>&- + /bin/mount -o noatime,move $2/sys /sys + /bin/mount -o noatime,move $2/dev /dev + /bin/mount -o noatime,move $2/tmp /tmp + /bin/mount -o noatime,move $2/overlay /overlay 2>&- return 0 } @@ -67,12 +67,12 @@ run_ramfs() { # <command> [...] exit 1 } - mount -o remount,ro /mnt - umount -l /mnt + /bin/mount -o remount,ro /mnt + /bin/umount -l /mnt grep /overlay /proc/mounts > /dev/null && { - mount -o noatime,remount,ro /overlay - umount -l /overlay + /bin/mount -o noatime,remount,ro /overlay + /bin/umount -l /overlay } # spawn a new shell from ramdisk to reduce the probability of cache issues @@ -144,7 +144,7 @@ v() { } rootfs_type() { - mount | awk '($3 ~ /^\/$/) && ($5 !~ /rootfs/) { print $5 }' + /bin/mount | awk '($3 ~ /^\/$/) && ($5 !~ /rootfs/) { print $5 }' } get_image() { # <source> [ <command> ] |