spacepaste

  1.  
  2. #!/sbin/openrc-run
  3. depend() {
  4. need localmount
  5. need bootmisc
  6. }
  7. start() {
  8. ebegin "Mounting 32-bit chroot directories"
  9. mount -o bind /opt/chroot_x86/gentoo32 /chroot/32bit-Gentoo >/dev/null
  10. mount -o bind /dev /chroot/32bit-Gentoo/dev >/dev/null
  11. mount -o bind /dev/pts /chroot/32bit-Gentoo/dev/pts >/dev/null &
  12. mount -o bind /dev/shm /chroot/32bit-Gentoo/dev/shm >/dev/null &
  13. mount -o bind /proc /chroot/32bit-Gentoo/proc >/dev/null
  14. mount -o bind /sys /chroot/32bit-Gentoo/sys >/dev/null &
  15. mount -o bind /tmp /chroot/32bit-Gentoo/tmp >/dev/null &
  16. mount -o bind /run/udev /chroot/32bit-Gentoo/run/udev >/dev/null &
  17. mount -o bind /usr/portage /chroot/32bit-Gentoo/usr/portage >/dev/null &
  18. eend $? "An error occured while attempting to mount 32bit chroot directories"
  19. ebegin "Copying 32bit chroot files"
  20. cp -pf /etc/resolv.conf /chroot/32bit-Gentoo/etc >/dev/null &
  21. cp -pf /etc/hosts /chroot/32bit-Gentoo/etc > /dev/null &
  22. cp -Ppf /etc/localtime /chroot/32bit-Gentoo/etc >/dev/null &
  23. eend $? "An error occured while attempting to copy 32 bits chroot files."
  24. }
  25. stop() {
  26. ebegin "Unmounting 32-bit chroot directories"
  27. umount -f /chroot/32bit-Gentoo/dev/pts >/dev/null
  28. umount -f /chroot/32bit-Gentoo/dev/shm >/dev/null
  29. umount -f /chroot/32bit-Gentoo/dev >/dev/null &
  30. umount -f /chroot/32bit-Gentoo/proc >/dev/null &
  31. umount -f /chroot/32bit-Gentoo/sys >/dev/null &
  32. umount -f /chroot/32bit-Gentoo/tmp >/dev/null &
  33. umount -f /chroot/32bit-Gentoo/run/udev >/dev/null &
  34. umount -f /chroot/32bit-Gentoo/usr/portage >/dev/null &
  35. umount -f /chroot/32bit-Gentoo >/dev/null &
  36. eend $? "An error occured while attempting to unmount 32bit chroot directories"
  37. }
  38. # mount -o bind /usr/portage chroot/32bit-Gentoo/usr/portage/ >/dev/null &
  39. # umount -f chroot/32bit-Gentoo/usr/portage/ >/dev/null &
  40.