summaryrefslogtreecommitdiff
path: root/src/VBox/Installer/linux/vboxdrv-pardus.py
blob: fe4e75d49d3accad77a72a06d0f3e01cb4288bbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Todo: this could be autogenerated from the init script lsbinfo
# Can Pardus do that now?

serviceType = "local"
serviceDesc = _({"en": "VirtualBox Driver Service"})
serviceDefault = "on"

from comar.service import *
import time, os

@synchronized
def start():
    ret = run("/usr/sbin/vboxdrv start")
    if ret == 0:
        notify("System.Service", "Changed", (script(), "started"))
    else:
        fail("Unable to start service")

@synchronized
def stop():
    ret = run("/usr/sbin/vboxdrv stop")
    if ret == 0:
        notify("System.Service", "Changed", (script(), "stopped"))
    else:
        fail("Unable to stop service")

def status():
    return run("/usr/sbin/vboxdrv status")