|  | @@ -169,6 +169,9 @@ case $ostype {
 | 
											
												
													
														|  |  	match=\'${basedev}\''?(s+([0-9]))'
 |  |  	match=\'${basedev}\''?(s+([0-9]))'
 | 
											
												
													
														|  |  	function mount_fs {
 |  |  	function mount_fs {
 | 
											
												
													
														|  |  	}
 |  |  	}
 | 
											
												
													
														|  | 
 |  | +	function umount_fs {
 | 
											
												
													
														|  | 
 |  | +		diskutil unmount "$1"
 | 
											
												
													
														|  | 
 |  | +	}
 | 
											
												
													
														|  |  	function create_fs {
 |  |  	function create_fs {
 | 
											
												
													
														|  |  		if [[ $3 = ext4 ]]; then
 |  |  		if [[ $3 = ext4 ]]; then
 | 
											
												
													
														|  |  			fstype=UFSD_EXTFS4
 |  |  			fstype=UFSD_EXTFS4
 | 
											
										
											
												
													
														|  | @@ -193,6 +196,9 @@ case $ostype {
 | 
											
												
													
														|  |  	function mount_fs {
 |  |  	function mount_fs {
 | 
											
												
													
														|  |  		mount -t "$3" "$1" "$2"
 |  |  		mount -t "$3" "$1" "$2"
 | 
											
												
													
														|  |  	}
 |  |  	}
 | 
											
												
													
														|  | 
 |  | +	function umount_fs {
 | 
											
												
													
														|  | 
 |  | +		umount "$1"
 | 
											
												
													
														|  | 
 |  | +	}
 | 
											
												
													
														|  |  	function create_fs {
 |  |  	function create_fs {
 | 
											
												
													
														|  |  		mkfs.$3 "$1"
 |  |  		mkfs.$3 "$1"
 | 
											
												
													
														|  |  		tune2fs -c 0 -i 0 "$1"
 |  |  		tune2fs -c 0 -i 0 "$1"
 | 
											
										
											
												
													
														|  | @@ -498,7 +504,7 @@ if (( datafssz )); then
 | 
											
												
													
														|  |  	(( noformat )) || create_fs "$datapart" ADKDATA ext4
 |  |  	(( noformat )) || create_fs "$datapart" ADKDATA ext4
 | 
											
												
													
														|  |  	mount_fs "$datapart" "$D" ext4
 |  |  	mount_fs "$datapart" "$D" ext4
 | 
											
												
													
														|  |  	mkdir -m0755 "$D/mpd" "$D/xbmc"
 |  |  	mkdir -m0755 "$D/mpd" "$D/xbmc"
 | 
											
												
													
														|  | -	umount "$D"
 |  | 
 | 
											
												
													
														|  | 
 |  | +	umount_fs "$D"
 | 
											
												
													
														|  |  fi
 |  |  fi
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  (( quiet )) || print Extracting installation archive...
 |  |  (( quiet )) || print Extracting installation archive...
 | 
											
										
											
												
													
														|  | @@ -516,7 +522,7 @@ case $target {
 | 
											
												
													
														|  |  		[[ -e "$x" ]] && mv -f "$R"/boot/* "$B/"
 |  |  		[[ -e "$x" ]] && mv -f "$R"/boot/* "$B/"
 | 
											
												
													
														|  |  		break
 |  |  		break
 | 
											
												
													
														|  |  	done
 |  |  	done
 | 
											
												
													
														|  | -	umount "$B"
 |  | 
 | 
											
												
													
														|  | 
 |  | +	umount_fs "$B"
 | 
											
												
													
														|  |  	;;
 |  |  	;;
 | 
											
												
													
														|  |  (solidrun-imx6)
 |  |  (solidrun-imx6)
 | 
											
												
													
														|  |  	for x in "$fwdir"/*.dtb; do
 |  |  	for x in "$fwdir"/*.dtb; do
 | 
											
										
											
												
													
														|  | @@ -561,7 +567,7 @@ fi
 | 
											
												
													
														|  |  (( quiet )) || print Finishing up...
 |  |  (( quiet )) || print Finishing up...
 | 
											
												
													
														|  |  cd "$ADK_TOPDIR"
 |  |  cd "$ADK_TOPDIR"
 | 
											
												
													
														|  |  sync
 |  |  sync
 | 
											
												
													
														|  | -umount "$R"
 |  | 
 | 
											
												
													
														|  | 
 |  | +umount_fs "$R"
 | 
											
												
													
														|  |  sync
 |  |  sync
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  rm -rf "$T"
 |  |  rm -rf "$T"
 |