summaryrefslogtreecommitdiff
path: root/umount.sh
blob: 9fc1a5b2c6e88194577d0d1c336007171ce0d193 (plain)
  1. #!/bin/sh
  2. . ./config-DEFAULTS || exit 1
  3. . ./config-HOST || exit 1
  4. . ./config-TARGET || exit 1
  5. . ./config-MANDATED || exit 1
  6. if [ "$1" = "temp" ]; then
  7. target="$targettemp"
  8. else
  9. target="$mountpoint"
  10. fi
  11. if [ "$FLASHYBRID" = "yes" ]; then
  12. if [ -d "$targetoffline" ]; then
  13. for dir in $flashybrid_diskstore; do
  14. umount $target$dir || true
  15. done
  16. else
  17. echo "WARNING: offline target $targetoffline does not exist." >&2
  18. fi
  19. fi
  20. [ -n "$pubdev_host" ] && umount "$target/pub" || true
  21. #umount proc-flashybrid || true
  22. if [ -d /sys ]; then
  23. umount "$target/sys" || true
  24. fi
  25. #if [ -d /dev/.udevdb ] || [ -f /dev/.devfsd ]; then
  26. # umount "$target/dev" || true
  27. #fi
  28. if [ ! "$1" = "temp" ]; then
  29. # [ -n "$bootdev_host" ] && umount "$target/boot" || true
  30. [ -n "$rootdev_host" ] && umount "$target" || true
  31. fi