1 | # Todo: this could be autogenerated from the init script lsbinfo
|
---|
2 | # Can Pardus do that now?
|
---|
3 |
|
---|
4 | serviceType = "local"
|
---|
5 | serviceDesc = _({"en": "VirtualBox Driver Service"})
|
---|
6 | serviceDefault = "on"
|
---|
7 |
|
---|
8 | from comar.service import *
|
---|
9 | import time, os
|
---|
10 |
|
---|
11 | @synchronized
|
---|
12 | def start():
|
---|
13 | ret = run("/usr/sbin/vboxdrv start")
|
---|
14 | if ret == 0:
|
---|
15 | notify("System.Service", "Changed", (script(), "started"))
|
---|
16 | else:
|
---|
17 | fail("Unable to start service")
|
---|
18 |
|
---|
19 | @synchronized
|
---|
20 | def stop():
|
---|
21 | ret = run("/usr/sbin/vboxdrv stop")
|
---|
22 | if ret == 0:
|
---|
23 | notify("System.Service", "Changed", (script(), "stopped"))
|
---|
24 | else:
|
---|
25 | fail("Unable to stop service")
|
---|
26 |
|
---|
27 | def status():
|
---|
28 | return run("/usr/sbin/vboxdrv status")
|
---|