VirtualBox

Changeset 89576 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Jun 9, 2021 10:32:41 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145013
Message:

Main: bugref:9948: Fixed GA installation on MacOS Catalina

Location:
trunk/src/VBox/Additions/darwin/Installer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/darwin/Installer/VBoxGuestAdditionsKEXTs/postflight

    r87880 r89576  
    4747
    4848unload_service "org.virtualbox.additions.vboxservice" "/Library/LaunchDaemons" "root"
    49 unload_service "org.virtualbox.additions.vboxclient" "/Library/LaunchAgents" "${USER}"
     49
     50# Remove the old service for all users
     51for user in $(dscl . -list /Users | grep -v -e'^_' -e'root'); do
     52    system_user="YES"
     53    test -n "$(dscl . -read /Users/$user NFSHomeDirectory | grep '/Users')" && system_user="NO"
     54    if [ "$system_user" = "NO" ]; then
     55        unload_service "org.virtualbox.additions.vboxclient" "/Library/LaunchAgents" "$user"
     56    fi
     57done
    5058
    5159items="VBoxGuest"
     
    7280
    7381load_service "org.virtualbox.additions.vboxservice" "/Library/LaunchDaemons" "root"
    74 load_service "org.virtualbox.additions.vboxclient" "/Library/LaunchAgents" "${USER}"
     82# Add VBoxClient for all currently defined users
     83for user in $(dscl . -list /Users | grep -v -e'^_' -e'root'); do
     84    system_user="YES"
     85    test -n "$(dscl . -read /Users/$user NFSHomeDirectory | grep '/Users')" && system_user="NO"
     86    if [ "$system_user" = "NO" ]; then
     87        load_service "org.virtualbox.additions.vboxclient" "/Library/LaunchAgents" "$user"
     88    fi
     89done
    7590
    7691echo "Warning: If VBoxService adjusts the time backwards (because of --biossystemtimeoffset), the installer may hang."
  • trunk/src/VBox/Additions/darwin/Installer/VBoxGuestAdditionsToolsAndServices/VBoxServiceWrapper

    r82968 r89576  
    3636done
    3737
     38echo "Check if VBoxClient is added for all non-system users"
     39for user in $(dscl . -list /Users | grep -v -e'^_' -e'root'); do
     40    system_user="YES"
     41    test -n "$(dscl . -read /Users/$user NFSHomeDirectory | grep '/Users')" && system_user="NO"
     42    if [ "$system_user" = "NO" ]; then
     43        loaded="NO"
     44        test -n "$(sudo -u "$user" launchctl list | grep 'org.virtualbox.additions.vboxclient')" && loaded="YES"
     45        if [ "$loaded" = "NO" ] ; then
     46            echo "Loading org.virtualbox.additions.vboxclient for $user"
     47            sudo -u "$user" launchctl load -F "/Library/LaunchAgents/org.virtualbox.additions.vboxclient.plist"
     48        fi
     49    fi
     50done
     51
    3852exec "/Library/Application Support/VirtualBox Guest Additions/VBoxService" -f
    3953
Note: See TracChangeset for help on using the changeset viewer.

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