Index: /trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostart.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostart.cpp	(revision 42383)
+++ /trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostart.cpp	(revision 42384)
@@ -105,5 +105,5 @@
  */
 static const RTGETOPTDEF g_aOptions[] = {
-#if defined(RT_OS_LINUX) || defined (RT_OS_SOLARIS) || defined(RT_OS_FREEBSD)
+#if defined(RT_OS_LINUX) || defined (RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) || defined(RT_OS_DARWIN)
     { "--background",           'b',                                       RTGETOPT_REQ_NOTHING },
 #endif
@@ -703,5 +703,5 @@
                 break;
 
-#if defined(RT_OS_LINUX) || defined (RT_OS_SOLARIS) || defined(RT_OS_FREEBSD)
+#if defined(RT_OS_LINUX) || defined (RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) || defined(RT_OS_DARWIN)
             case 'b':
                 pcszDescr = "Run in background (daemon mode).";
@@ -807,5 +807,5 @@
                 break;
 
-#if defined(RT_OS_LINUX) || defined (RT_OS_SOLARIS) || defined(RT_OS_FREEBSD)
+#if defined(RT_OS_LINUX) || defined (RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) || defined(RT_OS_DARWIN)
             case 'b':
                 g_fDaemonize = true;
@@ -853,5 +853,10 @@
     }
 
-    if (fStart == fStop)
+    if (!fStart && !fStop)
+    {
+        displayHelp(argv[0]);
+        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Either --start or --stop must be present");
+    }
+    else if (fStart && fStop)
     {
         displayHelp(argv[0]);
@@ -888,5 +893,5 @@
         return RTMsgErrorExit(RTEXITCODE_FAILURE, "failed to open release log (%s, %Rrc)", szError, rc);
 
-#if defined(RT_OS_LINUX) || defined (RT_OS_SOLARIS) || defined(RT_OS_FREEBSD)
+#if defined(RT_OS_LINUX) || defined (RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) || defined(RT_OS_DARWIN)
     if (g_fDaemonize)
     {
Index: /trunk/src/VBox/Installer/darwin/VirtualBox/VBoxAutostartDarwin.sh
===================================================================
--- /trunk/src/VBox/Installer/darwin/VirtualBox/VBoxAutostartDarwin.sh	(revision 42383)
+++ /trunk/src/VBox/Installer/darwin/VirtualBox/VBoxAutostartDarwin.sh	(revision 42384)
@@ -28,5 +28,5 @@
 
         # Check for known home directories and shells for daemons
-        if [[   "${HOMEDIR}" == "/var/empty" || "${HOMEDIR}" == "/dev/null"
+        if [[   "${HOMEDIR}" == "/var/empty" || "${HOMEDIR}" == "/dev/null" || "${HOMEDIR}" == "/var/root"
              || "${USERSHELL}" == "/usr/bin/false" || "${USERSHELL}" == "/dev/null" || "${USERSHELL}" == "/usr/sbin/uucico" ]]
         then
@@ -35,5 +35,5 @@
 
         # Start the daemon
-        su ${user} -c '/Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart --start --background --config /etc/vbox/autostart.cfg'
+        su ${user} -c "/Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart --quiet --start --background --config ${1}"
 
     done
@@ -41,5 +41,5 @@
 
 case $1 in
-    --start) vboxStartAllUserVms;;
+    --start) vboxStartAllUserVms ${2};;
           *) echo "Unknown option ${1}";;
 esac
Index: /trunk/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxautostart.plist
===================================================================
--- /trunk/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxautostart.plist	(revision 42383)
+++ /trunk/src/VBox/Installer/darwin/VirtualBox/org.virtualbox.vboxautostart.plist	(revision 42384)
@@ -13,4 +13,5 @@
     <string>/Applications/VirtualBox.app/Contents/MacOS/VBoxAutostartDarwin.sh</string>
     <string>--start</string>
+    <string>/etc/vbox/autostart.cfg</string>
   </array>
 </dict>
