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