Advertisement
Guest User

Untitled

a guest
May 7th, 2011
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. diff -r f5b9af99dcb8 tazdev/tazdev
  2. --- a/tazdev/tazdev Sat May 07 08:28:39 2011 +0000
  3. +++ b/tazdev/tazdev Sat May 07 09:25:29 2011 +0000
  4. @@ -111,15 +111,15 @@
  5. fi
  6. # Mount source so they can be shared between cooking/stable/undigest.
  7. # But do it only if it's a slitaz developement chroot.
  8. - fs=$rootfs/home/slitaz
  9. - if [ -d "$slitaz" ]; then
  10. - mkdir -p $SLITAZ/src $fs/src
  11. - mount -o bind $SLITAZ/src $fs/src
  12. - # Now mount package dir so they are in /home/slitaz/$version
  13. - # We may not mount cache wok or others it has no point and if
  14. - # one want to use a shared wok he can bind it manually.
  15. - mkdir -p $slitaz/packages $fs/packages
  16. - mount -o bind $slitaz/packages $fs/packages
  17. +
  18. + if [ -f /etc/slitaz/cook.conf ]; then
  19. + fs=${rootfs}${slitaz}
  20. + if [ -d "$slitaz" ]; then
  21. + for i in packages cache wok-hg wok logs cache; do
  22. + mkdir -p $slitaz/$i $fs/$i
  23. + mount -o bind $slitaz/$i $fs/$i
  24. + done
  25. + fi
  26. fi
  27. }
  28.  
  29. @@ -128,14 +128,15 @@
  30. umount_chroot()
  31. {
  32. [ "$1" ] && ROOTF=$1
  33. - fs=$rootfs/home/slitaz
  34. + fs=${rootfs}${slitaz}
  35. echo -ne "\nUnmounting virtual filesystems..."
  36. - umount $rootfs/dev/shm
  37. - umount $rootfs/dev/pts
  38. - umount $rootfs/sys
  39. - umount $rootfs/proc
  40. - umount $fs/src
  41. - umount $fs/packages
  42. + umount -l $rootfs/dev/shm
  43. + umount -l $rootfs/dev/pts
  44. + umount -l $rootfs/sys
  45. + umount -l $rootfs/proc
  46. + for i in packages cache wok-hg wok logs cache; do
  47. + [ -d $fs/$i ] && umount -l $fs/$i
  48. + fi
  49. status && echo ""
  50. #echo -e "\nProcess: $ps\n"
  51. #ps | grep `basename $0` | grep -v grep
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement