diff options
Diffstat (limited to 'src/VBox/Installer/darwin/VirtualBox/postflight')
-rwxr-xr-x | src/VBox/Installer/darwin/VirtualBox/postflight | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/VBox/Installer/darwin/VirtualBox/postflight b/src/VBox/Installer/darwin/VirtualBox/postflight index a7f5f9b4..57271316 100755 --- a/src/VBox/Installer/darwin/VirtualBox/postflight +++ b/src/VBox/Installer/darwin/VirtualBox/postflight @@ -16,12 +16,6 @@ CP="/bin/cp -f" CPDIR="${CP} -R" # -# Correct the ownership of the directories in case there -# was an existing installation. -# -chown -R root:admin /Applications/VirtualBox.app - -# # Select the right architecture. # MY_ARCH=`uname -m` @@ -39,7 +33,7 @@ do exit 1; fi rm -f "$linkname" - ln -vh "$trg" "$linkname" + /bin/ln -vh "$trg" "$linkname" done # @@ -90,5 +84,22 @@ if [[ -e "${LSREGISTER}" && "x" != "x${USER}" ]]; then /usr/bin/sudo -u "${USER}" ${LSREGISTER} -f /Applications/VirtualBox.app/Contents/Resources/vmstarter.app fi -exit 0; +# Check environment. +if [ "${INSTALLER_TEMP}x" == "x" ]; then + echo "Required environment variable INSTALLER_TEMP is missing. Aborting installation." + exit 1; +fi +# Restore previously installed Extension Packs (if any) +if [ -d "${INSTALLER_TEMP}/ExtensionPacks" ]; then + cp -r "${INSTALLER_TEMP}/ExtensionPacks" "${VBOX_INSTALL_PATH}" + rm -rf "${INSTALLER_TEMP}/ExtensionPacks" +fi + +# +# Correct the ownership of the directories in case there +# was an existing installation. +# +chown -R root:admin /Applications/VirtualBox.app + +exit 0; |