Magellan Linux

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

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

revision 6835 by niro, Thu Jul 23 12:24:32 2015 UTC revision 6836 by niro, Thu Jul 23 12:28:53 2015 UTC
# Line 55  is_loc_mounted() Line 55  is_loc_mounted()
55  trap_exit()  trap_exit()
56  {  {
57   [[ -n ${SWAPHDD} ]] && swapoff ${SWAPHDD}   [[ -n ${SWAPHDD} ]] && swapoff ${SWAPHDD}
58   is_loc_mounted "${INSTALLPATH}/dev" && umount ${INSTALLPATH}/dev   is_loc_mounted "${INSTALL_ROOT}/dev" && umount ${INSTALL_ROOT}/dev
59   is_loc_mounted "${INSTALLPATH}/proc" && umount ${INSTALLPATH}/proc   is_loc_mounted "${INSTALL_ROOT}/proc" && umount ${INSTALL_ROOT}/proc
60   is_loc_mounted "${INSTALLPATH}/sys" && umount ${INSTALLPATH}/sys   is_loc_mounted "${INSTALL_ROOT}/sys" && umount ${INSTALL_ROOT}/sys
61   is_loc_mounted "${INSTALLPATH}/boot" && umount ${INSTALLPATH}/boot   is_loc_mounted "${INSTALL_ROOT}/boot" && umount ${INSTALL_ROOT}/boot
62   is_loc_mounted "${INSTALLPATH}" && umount ${INSTALLPATH}   is_loc_mounted "${INSTALL_ROOT}" && umount ${INSTALL_ROOT}
63   echo "installation aborted"   echo "installation aborted"
64   exit 1   exit 1
65  }  }
# Line 68  enter_chroot() Line 68  enter_chroot()
68  {  {
69   local cmd="$@"   local cmd="$@"
70    
71   is_loc_mounted "${INSTALLPATH}/proc" || mount -t proc proc ${INSTALLPATH}/proc   is_loc_mounted "${INSTALL_ROOT}/proc" || mount -t proc proc ${INSTALL_ROOT}/proc
72   is_loc_mounted "${INSTALLPATH}/sys" || mount -t sysfs sysfs ${INSTALLPATH}/sys   is_loc_mounted "${INSTALL_ROOT}/sys" || mount -t sysfs sysfs ${INSTALL_ROOT}/sys
73   is_loc_mounted "${INSTALLPATH}/dev" || mount -o bind /dev ${INSTALLPATH}/dev   is_loc_mounted "${INSTALL_ROOT}/dev" || mount -o bind /dev ${INSTALL_ROOT}/dev
74    
75   chroot ${INSTALLPATH} ${cmd} || die "enter_chroot() '${INSTALLPATH}' '${cmd}'"   chroot ${INSTALL_ROOT} ${cmd} || die "enter_chroot() '${INSTALL_ROOT}' '${cmd}'"
76    
77   is_loc_mounted "${INSTALLPATH}/dev" && umount  ${INSTALLPATH}/dev   is_loc_mounted "${INSTALL_ROOT}/dev" && umount  ${INSTALL_ROOT}/dev
78   is_loc_mounted "${INSTALLPATH}/sys" && umount ${INSTALLPATH}/sys   is_loc_mounted "${INSTALL_ROOT}/sys" && umount ${INSTALL_ROOT}/sys
79   is_loc_mounted "${INSTALLPATH}/proc" && umount ${INSTALLPATH}/proc   is_loc_mounted "${INSTALL_ROOT}/proc" && umount ${INSTALL_ROOT}/proc
80  }  }
81    
82  enter_chroot_installrc()  enter_chroot_installrc()
83  {  {
84   [ -f ${INSTALLPATH}/.installrc ] || die "enter_chroot_installrc() ${INSTALLPATH}/.installrc missing"   [ -f ${INSTALL_ROOT}/.installrc ] || die "enter_chroot_installrc() ${INSTALL_ROOT}/.installrc missing"
85   enter_chroot /bin/bash -i /.installrc || die "enter_chroot_installrc() run"   enter_chroot /bin/bash -i /.installrc || die "enter_chroot_installrc() run"
86   [ -f ${INSTALLPATH}/.installrc ] && rm ${INSTALLPATH}/.installrc   [ -f ${INSTALL_ROOT}/.installrc ] && rm ${INSTALL_ROOT}/.installrc
87  }  }

Legend:
Removed from v.6835  
changed lines
  Added in v.6836