Magellan Linux

Diff of /trunk/bootstrap/mage-bootstrap.sh.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2180 by niro, Tue Oct 8 14:39:21 2013 UTC revision 2587 by niro, Thu Feb 6 13:05:57 2014 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  # $Header: /home/cvsd/magellan-cvs/magellan-src/bootstrap/scripts/mage-bootstrap.sh,v 1.8 2008-06-23 19:26:40 niro Exp $  # $Id$
3    
4  TOOLCHAIN=""  TOOLCHAIN=""
5  BASESYSTEM=""  BASESYSTEM=""
# Line 79  add_initrc() Line 79  add_initrc()
79    
80  enter_chroot()  enter_chroot()
81  {  {
82   mount -t proc proc ${MROOT}/proc || die "mount proc"   is_loc_mounted "${MROOT}/proc" || mount -t proc proc ${MROOT}/proc
83   mount -t sysfs sysfs ${MROOT}/sys || die "mount sys"   is_loc_mounted "${MROOT}/sys" || mount -t sysfs sysfs ${MROOT}/sys
84   mount -o bind /dev ${MROOT}/dev || die "mount dev"   is_loc_mounted "${MROOT}/dev" || mount -o bind /dev ${MROOT}/dev
85    
86   chroot ${MROOT} /bin/bash -i /.installrc || die "chr00ting"   chroot ${MROOT} /bin/bash -i /.installrc || die "chr00ting"
87    
88   umount ${MROOT}/dev ${MROOT}/sys ${MROOT}/proc || die "mount proc/sys/dev"   is_loc_mounted "${MROOT}/dev" && umount ${MROOT}/dev
89     is_loc_mounted "${MROOT}/sys" && umount ${MROOT}/sys
90     is_loc_mounted "${MROOT}/proc" && umount ${MROOT}/proc
91    
92   [ -f ${MROOT}/.installrc ] && rm ${MROOT}/.installrc   [ -f ${MROOT}/.installrc ] && rm ${MROOT}/.installrc
93  }  }
# Line 216  fi Line 218  fi
218  [ -z "${BASESYSTEM}" ] && BASESYSTEM="$(< ${MY_MAGEDIR}/profiles/${PROFILE}/basesystem.defaults)"  [ -z "${BASESYSTEM}" ] && BASESYSTEM="$(< ${MY_MAGEDIR}/profiles/${PROFILE}/basesystem.defaults)"
219    
220  # install toolchain  # install toolchain
221  CONFIG_PROTECT="-*" MROOT="${MROOT}" MAGERC="${MAGERC}" mage install ${TOOLCHAIN} || die "toolchain install"  if ! MROOT="${MROOT}" MAGERC="${MAGERC}" magequery -n ${TOOLCHAIN}
222    then
223     CONFIG_PROTECT="-*" MROOT="${MROOT}" MAGERC="${MAGERC}" mage install ${TOOLCHAIN} || die "toolchain install"
224    fi
225    
226  # umount dirs, they are not needed anymore  # umount dirs, they are not needed anymore
227  umount ${MY_MAGEDIR} ${MY_PKGDIR} || die "umount mage/pkgdir"  umount ${MY_MAGEDIR} ${MY_PKGDIR} || die "umount mage/pkgdir"

Legend:
Removed from v.2180  
changed lines
  Added in v.2587