VirtualBox

Ignore:
Timestamp:
Aug 25, 2011 8:53:23 AM (13 years ago)
Author:
vboxsync
Message:

Installer-OSX: check that $USER is defined

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/darwin/VirtualBox/postflight

    r34275 r38522  
    6969    echo "Installing vboxwebsrv launchd file to ${VBOXWEBSRV_TRG}"
    7070    ${CP} "${VBOXWEBSRV}" "${VBOXWEBSRV_TRG}/"
    71     /usr/sbin/chown "${USER}" "${VBOXWEBSRV_TRG}/org.virtualbox.vboxwebsrv.plist"
     71    [ "x" != "x${USER}" ] && /usr/sbin/chown "${USER}" "${VBOXWEBSRV_TRG}/org.virtualbox.vboxwebsrv.plist"
    7272fi
    7373
     
    8585#
    8686LSREGISTER=/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister
    87 if [ -e ${LSREGISTER} ]; then
    88     echo "Register file extensions for $USER"
     87if [[ -e "${LSREGISTER}" && "x" != "x${USER}" ]]; then
     88    echo "Register file extensions for \"${USER}\""
    8989    /usr/bin/sudo -u "${USER}" ${LSREGISTER} -f /Applications/VirtualBox.app
    9090    /usr/bin/sudo -u "${USER}" ${LSREGISTER} -f /Applications/VirtualBox.app/Contents/Resources/vmstarter.app
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette