Chameleon Applications

Chameleon Applications Svn Source Tree

Root/branches/blackosx/trunk/PackageBuilder/Main_Package_Elements/Scripts/UnMountEFIvolumes.sh

  • Property svn:executable set to *
1#!/bin/bash
2
3echo "==============================================="
4echo "Unmount all volumes named EFI"
5echo "*****************************"
6
7# loop through and un-mount ALL mounted EFI system partitions - Thanks kizwan
8
9attempts=1
10while [ "$( df | grep EFI )" ] && [ "${attempts}" -lt 5 ]; do
11echo "Unmounting $( df | grep EFI | awk '{print $1}' )"
12umount -f $( df | grep EFI | awk '{print $1}' )
13attempts=$(( ${attempts} + 1 ))
14done
15if [ ${attempts} = 5 ]; then
16echo "failed to unmount EFI System Partition."
17echo "-----------------------------------------------"
18echo ""
19echo ""
20echo ""
21exit 1
22fi
23
24echo "-----------------------------------------------"
25echo ""
26echo ""
27echo ""
28
29exit 0
30
31
32
33

Archive Download this file

Revision: 221