diff options
author | John Crispin <john@openwrt.org> | 2013-12-27 21:15:09 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2013-12-27 21:15:09 +0000 |
commit | 834204bda64d78c5c2d6228c236246291a1ed7d8 (patch) | |
tree | 2dd473525908ecdb2b2749daf901507953e807a0 /package | |
parent | 9715b61b3cbae4065226031151530e099e913e21 (diff) | |
download | mtk-20170518-834204bda64d78c5c2d6228c236246291a1ed7d8.zip mtk-20170518-834204bda64d78c5c2d6228c236246291a1ed7d8.tar.gz mtk-20170518-834204bda64d78c5c2d6228c236246291a1ed7d8.tar.bz2 |
base-files: fix mount-utils incompatibility
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
SVN-Revision: 39169
Diffstat (limited to 'package')
-rwxr-xr-x | package/base-files/files/etc/init.d/boot | 2 | ||||
-rwxr-xr-x | package/base-files/files/etc/init.d/umount | 2 | ||||
-rwxr-xr-x | package/base-files/files/lib/functions.sh | 22 | ||||
-rw-r--r-- | package/base-files/files/lib/upgrade/common.sh | 24 |
4 files changed, 25 insertions, 25 deletions
diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index ffcc9f7..8b5455d 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -50,7 +50,7 @@ boot() { touch /var/log/lastlog touch /tmp/resolv.conf.auto ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf - grep -q debugfs /proc/filesystems && mount -o noatime -t debugfs debugfs /sys/kernel/debug + grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe /sbin/kmodloader diff --git a/package/base-files/files/etc/init.d/umount b/package/base-files/files/etc/init.d/umount index 13ac61a..349b2b3 100755 --- a/package/base-files/files/etc/init.d/umount +++ b/package/base-files/files/etc/init.d/umount @@ -4,5 +4,5 @@ STOP=99 stop() { sync - umount -a -d -r + /bin/umount -a -d -r } diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 6f23e0b..e7ca02a 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 } diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index 15ee703..824a099 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> ] |