On Thursday 26 July 2012 20:21:16 Silvio Siefke wrote: > The way sounds intresting. The Script were nice, and if u have so a > howto can send me the link.
/etc/init.d/atom attached. It ought also to include a command to extract the useful bits of /etc/mtab and copy those to the chroot; otherwise eclean complains that it can't read the table of mounts. There used to be a suitable command somewhere in the installation docs but I can't find it now. It used grep to omit bits that didn't help. Mind you, if you can persuade Neil to document his modus operandi that will be a good deal better than my fumbling efforts. -- Rgds Peter
#!/sbin/runscript depend() { need localmount need bootmisc } start() { ebegin "Mounting 32-bit chroot dirs" mount -o bind /dev /mnt/atom/dev >/dev/null mount -o bind /dev/pts /mnt/atom/dev/pts >/dev/null mount -o bind /dev/shm /mnt/atom/dev/shm >/dev/null mount -t proc /proc /mnt/atom/proc >/dev/null mount -o bind /sys /mnt/atom/sys >/dev/null mount -o bind /tmp /mnt/atom/tmp >/dev/null mount -t nfs -o vers=3 192.168.2.2:/usr/portage/packages /mnt/atom/usr/portage/packages eend $? "An error occurred while attempting to mount 32-bit chroot directories" ebegin "Copying 32-bit chroot files" cp -pf /etc/resolv.conf /mnt/atom/etc/ >/dev/null cp -pf /etc/passwd /mnt/atom/etc/ >/dev/null cp -pf /etc/shadow /mnt/atom/etc/ >/dev/null cp -pf /etc/group /mnt/atom/etc/ >/dev/null cp -pf /etc/hosts /mnt/atom/etc/ > /dev/null cp -Ppf /etc/localtime /mnt/atom/etc/ >/dev/null eend $? "An error occurred while attempting to copy 32-bit chroot files." } stop() { ebegin "Unmounting 32-bit chroot dirs" umount -f /mnt/atom/dev/pts >/dev/null umount -f /mnt/atom/dev/shm >/dev/null umount -f /mnt/atom/dev >/dev/null umount -f /mnt/atom/proc >/dev/null umount -f /mnt/atom/sys >/dev/null umount -f /mnt/atom/tmp >/dev/null umount -f /mnt/atom/usr/portage/packages >/dev/null eend $? "An error occurred while attempting to unmount 32-bit chroot directories" }