Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > aad35494d6fbef42cd34018d104ca896 > files > 6

vboxtool-0.4-1mdv2010.1.src.rpm

diff -p -up script/vboxtoolinit.orig script/vboxtoolinit
--- script/vboxtoolinit.orig	2009-05-11 21:00:29.000000000 +0200
+++ script/vboxtoolinit	2010-02-11 20:09:06.802424669 +0100
@@ -28,12 +28,15 @@
 #  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+# chkconfig:         2345 57 43
+
 ### BEGIN INIT INFO
 # Provides:          vboxtool
 # Required-Start:    $syslog $local_fs
 # Required-Stop:     $syslog $local_fs
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
+# Short-Description: The Vboxtool initscript
 # Description:       Controls VirtualBox sessions
 ### END INIT INFO
 
@@ -55,6 +58,12 @@ stop()
   nohup $su_command "vboxtool save" > /dev/null
 }
 
+status()
+{
+  # 'vboxtoolinit status' maps to 'vboxtool show' which shows all sessions states.
+  $su_command "vboxtool show"
+}
+
 restart()
 {
   stop
@@ -97,7 +106,10 @@ stop)
   ;;
 restart)
   restart
-  ;;  
+  ;;
+status)
+  status
+  ;;
 *)
   ;;  
 esac