Magellan Linux

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

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

revision 6830 by niro, Thu Jul 23 11:50:00 2015 UTC revision 6831 by niro, Thu Jul 23 12:04:49 2015 UTC
# Line 39  clearconfig() Line 39  clearconfig()
39   fi   fi
40   : > ${CONFIG}   : > ${CONFIG}
41  }  }
42    
43    is_loc_mounted()
44    {
45     local mountpoint
46     local i
47     mountpoint=$1
48    
49     i="$(cat /proc/mounts | grep " ${mountpoint} " | cut -d ' ' -f2)"
50     [[ ${i} != ${mountpoint} ]] && return 1
51    
52     return 0
53    }
54    
55    trap_exit()
56    {
57     [[ -n ${SWAPHDD} ]] && swapoff ${SWAPHDD}
58     is_loc_mounted "${INSTALLPATH}/dev" && umount ${INSTALLPATH}/dev
59     is_loc_mounted "${INSTALLPATH}/proc" && umount ${INSTALLPATH}/proc
60     is_loc_mounted "${INSTALLPATH}/sys" && umount ${INSTALLPATH}/sys
61     is_loc_mounted "${INSTALLPATH}/boot" && umount ${INSTALLPATH}/boot
62     is_loc_mounted "${INSTALLPATH}" && umount ${INSTALLPATH}
63     echo "installation aborted"
64     exit 1
65    }

Legend:
Removed from v.6830  
changed lines
  Added in v.6831