summaryrefslogtreecommitdiff
path: root/mount.sh
blob: 599027ac8fd26b94535ae22740df5661672e92bb (plain)
  1. #!/bin/sh
  2. set -e
  3. . ./config-DEFAULTS || exit 1
  4. . ./config-HOST || exit 1
  5. . ./config-TARGET || exit 1
  6. . ./config-MANDATED || exit 1
  7. if [ "$1" = "temp" ]; then
  8. target="$targettemp"
  9. else
  10. target="$mountpoint"
  11. [ -n "$rootdev_host" ] && mount "$rootdev_host" "$target"
  12. # [ -n "$bootdev_host" ] && mount "$bootdev_host" "$target/boot"
  13. fi
  14. #mount proc-flashybrid "$target/proc" -t proc
  15. #mount pts-flashybrid "$target/dev/pts" -t pts
  16. #mount shm-flashybrid "$target/dev/shm" -t shm
  17. #mount usbfs-flashybrid "$target/proc/bus/usb" -t usbfs
  18. #if [ -d /dev/.udevdb ] || [ -f /dev/.devfsd ]; then
  19. # mount --bind /dev "$target/dev"
  20. #fi
  21. if [ -d /sys ]; then
  22. mount --bind /sys "$target/sys"
  23. fi
  24. [ -n "$pubdev_host" ] && mount -t "$pubfs" "$pubdev_host" "$target/pub"
  25. if [ "$FLASHYBRID" = "yes" ]; then
  26. if [ -d "$targetoffline" ]; then
  27. for dir in $flashybrid_diskstore; do
  28. if [ -d "$targetoffline$dir" ] && [ -d "$target$dir" ]; then
  29. mount --bind "$targetoffline$dir" "$target$dir"
  30. else
  31. echo "WARNING: diskstore dir \"$dir\" missing - ignoring." >&2
  32. fi
  33. done
  34. else
  35. echo "WARNING: offline target $targetoffline does not exist." >&2
  36. fi
  37. fi