Magellan Linux

Diff of /alx-src/trunk/alxinstall-ng/functions/generic.sh

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

revision 6832 by niro, Thu Jul 23 12:04:49 2015 UTC revision 6833 by niro, Thu Jul 23 12:24:32 2015 UTC
# Line 63  trap_exit() Line 63  trap_exit()
63   echo "installation aborted"   echo "installation aborted"
64   exit 1   exit 1
65  }  }
66    
67    enter_chroot()
68    {
69     local cmd="$@"
70    
71     is_loc_mounted "${INSTALLPATH}/proc" || mount -t proc proc ${INSTALLPATH}/proc
72     is_loc_mounted "${INSTALLPATH}/sys" || mount -t sysfs sysfs ${INSTALLPATH}/sys
73     is_loc_mounted "${INSTALLPATH}/dev" || mount -o bind /dev ${INSTALLPATH}/dev
74    
75     chroot ${INSTALLPATH} ${cmd} || die "enter_chroot() '${INSTALLPATH}' '${cmd}'"
76    
77     is_loc_mounted "${INSTALLPATH}/dev" && umount  ${INSTALLPATH}/dev
78     is_loc_mounted "${INSTALLPATH}/sys" && umount ${INSTALLPATH}/sys
79     is_loc_mounted "${INSTALLPATH}/proc" && umount ${INSTALLPATH}/proc
80    }
81    
82    enter_chroot_installrc()
83    {
84     [ -f ${INSTALLPATH}/.installrc ] || die "enter_chroot_installrc() ${INSTALLPATH}/.installrc missing"
85     enter_chroot /bin/bash -i /.installrc || die "enter_chroot_installrc() run"
86     [ -f ${INSTALLPATH}/.installrc ] && rm ${INSTALLPATH}/.installrc
87    }

Legend:
Removed from v.6832  
changed lines
  Added in v.6833