From 5c5303179c6760b227c8d466eaaf41fb02b64e3a Mon Sep 17 00:00:00 2001 From: Thorsten Glaser Date: Sat, 27 Sep 2014 22:52:19 +0200 Subject: =?UTF-8?q?sometimes,=20umount(8)=20doesn=E2=80=99t=20do=20what=20?= =?UTF-8?q?it=E2=80=99s=20supposed=20to,=20on=20OSX=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/install.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'scripts/install.sh') diff --git a/scripts/install.sh b/scripts/install.sh index 39d84c6be..a874bfb69 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -169,6 +169,9 @@ case $ostype { match=\'${basedev}\''?(s+([0-9]))' function mount_fs { } + function umount_fs { + diskutil unmount "$1" + } function create_fs { if [[ $3 = ext4 ]]; then fstype=UFSD_EXTFS4 @@ -193,6 +196,9 @@ case $ostype { function mount_fs { mount -t "$3" "$1" "$2" } + function umount_fs { + umount "$1" + } function create_fs { mkfs.$3 "$1" tune2fs -c 0 -i 0 "$1" @@ -498,7 +504,7 @@ if (( datafssz )); then (( noformat )) || create_fs "$datapart" ADKDATA ext4 mount_fs "$datapart" "$D" ext4 mkdir -m0755 "$D/mpd" "$D/xbmc" - umount "$D" + umount_fs "$D" fi (( quiet )) || print Extracting installation archive... @@ -516,7 +522,7 @@ case $target { [[ -e "$x" ]] && mv -f "$R"/boot/* "$B/" break done - umount "$B" + umount_fs "$B" ;; (solidrun-imx6) for x in "$fwdir"/*.dtb; do @@ -561,7 +567,7 @@ fi (( quiet )) || print Finishing up... cd "$ADK_TOPDIR" sync -umount "$R" +umount_fs "$R" sync rm -rf "$T" -- cgit v1.2.3