alfs-0.3 chroot

James J. jjohnson at eclipse.ncsc.mil
Thu Sep 7 15:10:22 PDT 2000


I've been poking around the alfs-0.3 script's enter_chroot stage and 
can't figure out why the author has bash run the /usr/src/alfs/retry 
script when he calls chroot. Anyone (like, oh, maybe the author;) know 
why?

Here's the enter_chroot stage for your reading pleasure:

----------START HERE----------
#!/bin/bash -ex
# /usr/src/lfs/enter_chroot

# enters the chroot environment
# when $1=recover, re-enters to chroot environment to allow retries

case $1 in
  pre-test)
    ;;
  install-tarball|recover)
    if [ "$1"  != recover ]; then
      echo "entering chroot environment" >> $log
      tail +2 $stagelist > $LFS/$stagelist
    fi
    chroot $LFS /bin/bash -ex /usr/src/alfs/retry
    tail +$(echo $(nl $stagelist | grep exit_chroot) | cut -f 1 -d " ") 
\
         $stagelist > $recover
    rm $stagelist
    mv $recover $stagelist
    > $recover
    ;;
  *)
    echo $stage: $1: not implemented
    exit 1
    ;;
esac
----------END HERE----------






More information about the alfs-discuss mailing list