VirtualBox

Ignore:
Timestamp:
Oct 7, 2013 4:13:23 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
89624
Message:

Replaced VBoxStartupItems with a launch script and plist located in the VBoxKEXTs pacakge. To provide a script for loading, loading and reloading drivers manually, I modified the existing startup item script instead of cleanup up the intendation of the proposed vbox kext keeper script.

Location:
trunk/src/VBox/Installer/darwin/VBoxKEXTs
Files:
1 added
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/darwin/VBoxKEXTs/VirtualBoxStartup.sh

    • Property svn:keywords set to Author Date Id Revision
    r48924 r48928  
    1818#
    1919
    20 . /etc/rc.common
     20if false; then
     21    . /etc/rc.common
     22else
     23    # Fake the startup item functions we're using.
     24
     25    ConsoleMessage()
     26    {
     27        if [ "$1" != "-f" ]; then
     28            echo "$@"
     29        else
     30            shift
     31            echo "Fatal error: $@"
     32            exit 1;
     33        fi
     34    }
     35
     36    RunService()
     37    {
     38        case "$1" in
     39            "start")
     40                StartService
     41                exit $?;
     42                ;;
     43            "stop")
     44                StopService
     45                exit $?;
     46                ;;
     47            "restart")
     48                RestartService
     49                exit $?;
     50                ;;
     51            "launchd")
     52                if RestartService; then
     53                    while true;
     54                    do
     55                        sleep 3600
     56                    done
     57                fi
     58                exit $?;
     59                ;;
     60             **)
     61                echo "Error: Unknown action '$1'"
     62                exit 1;
     63        esac                   
     64    }
     65fi
    2166
    2267
  • trunk/src/VBox/Installer/darwin/VBoxKEXTs/postflight

    r48924 r48928  
    1616# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
    1717#
     18
     19#
     20# Make sure the old startup items are gone.
     21#
     22if [ -d /Library/StartupItems/VirtualBox/ ]; then
     23    rm -vf  "/Library/StartupItems/VirtualBox/StartupParameters.plist"
     24    rm -vf  "/Library/StartupItems/VirtualBox/VirtualBox"
     25    rm -vf  "/Library/StartupItems/VirtualBox/Resources/English.lproj/Localizable.strings"
     26    test -d "/Library/StartupItems/VirtualBox/Resources/English.lproj/" && rmdir "/Library/StartupItems/VirtualBox/Resources/English.lproj/"
     27    test -d "/Library/StartupItems/VirtualBox/Resources/"               && rmdir "/Library/StartupItems/VirtualBox/Resources/"
     28    test -d "/Library/StartupItems/VirtualBox/"                         && rmdir "/Library/StartupItems/VirtualBox/"
     29fi
     30
     31#
     32# Install the launchd script.
     33#
     34rm -vf "/Library/LaunchDaemons/org.virtualbox.startup.plist"
     35set -e
     36ln -s  "../Application Support/VirtualBox/LaunchDaemons/org.virtualbox.startup.plist" \
     37       "/Library/LaunchDaemons/org.virtualbox.startup.plist"
     38set +e
    1839
    1940#
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