# 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")