I've written the script below for starting the exiting the chroot environment 
for starting and stopping the LFS project. I'M concerned about the logout and 
umount commands. I need the script to do all the unmounts upon exiting or 
logging out. I'M afraid what I've written here will simply chroot and then 
immediately logout via the "logout" line in the script rather than doing the 
umounts when I personally logout myself. Have I written this right or what 
changes do I need to make?

export LFS=/mnt/lfs                  &&mount -v --bind /dev $LFS/dev        
&&mount -vt devpts devpts $LFS/dev/pts &&mount -vt proc proc $LFS/proc        
&&mount -vt sysfs sysfs $LFS/sys       &&
chroot "$LFS" /tools/bin/env -i \    HOME=/root                  \    
TERM="$TERM"                \    PS1='\u:\w\$ '              \    
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \    /tools/bin/bash --login +h
logoutumount -v $LFS/dev/ptsumount -v $LFS/dev/shmumount -v $LFS/devumount -v 
$LFS/procumount -v $LFS/sysumount -v $LFSumount -v $LFS/usrumount -v 
$LFS/homeumount -v $LFS                                        
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to