[vbox-dev] Patch for begin(), status() functions in vboxadd-timesync.sh

Bjorn Buckwalter bjorn.buckwalter at gmail.com
Sat Feb 14 20:58:16 GMT 2009


Hi All,

Pasted below (and attached) is a patch for
src/VBox/Additions/linux/installer/vboxadd-timesync.sh. The patch adds
begin() functions for Arch Linux and Slackware. These were previously
missing causing an error when using "start". The patch also promotes
the status() function previously only defined for Slackware to the
"top-level".

Thanks,
Bjorn Buckwalter


Index: vboxadd-timesync.sh
===================================================================
--- vboxadd-timesync.sh	(revision 16650)
+++ vboxadd-timesync.sh	(working copy)
@@ -165,6 +165,10 @@
     succ_msg() {
         stat_done
     }
+
+    begin() {
+        stat_busy "$1"
+    }
 fi

 if [ "$system" = "slackware" ]; then
@@ -185,15 +189,9 @@
         echo " ...done."
     }

-    status() {
-        echo -n "Checking for vboxadd-timesync"
-        if [ -f /var/run/$1 ]; then
-            echo " ...running"
-        else
-            echo " ...not running"
-        fi
+    begin() {
+        echo -n "$1"
     }
-
 fi

 if [ "$system" = "other" ]; then
@@ -255,8 +253,13 @@
     stop && start
 }

-dmnstatus() {
-    status vboxadd-timesync
+status() {
+    echo -n "Checking for vboxadd-timesync"
+    if [ -f $PIDFILE ]; then
+        echo " ...running"
+    else
+        echo " ...not running"
+    fi
 }

 case "$1" in
@@ -270,7 +273,7 @@
     restart
     ;;
 status)
-    dmnstatus
+    status
     ;;
 *)
     echo "Usage: $0 {start|stop|restart|status}"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vboxadd-timesync.sh.patch
Type: application/octet-stream
Size: 1083 bytes
Desc: not available
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20090214/e580033e/attachment.obj>


More information about the vbox-dev mailing list