summaryrefslogtreecommitdiff
path: root/scripts/install.sh
diff options
context:
space:
mode:
authorThorsten Glaser <tg@mirbsd.org>2014-09-27 22:52:19 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-09-27 22:52:19 +0200
commit5c5303179c6760b227c8d466eaaf41fb02b64e3a (patch)
treeec7809465ae9910357e4e074a02203cf50da8834 /scripts/install.sh
parentd0970e5928748c07e023d2cf7efc93af716500ec (diff)
sometimes, umount(8) doesn’t do what it’s supposed to, on OSX…
Diffstat (limited to 'scripts/install.sh')
-rwxr-xr-xscripts/install.sh12
1 files changed, 9 insertions, 3 deletions
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"