service: More DragonFly BSD support (#40449)
- Use NetBSD's service_enable which sets the vars correctly in /etc/rc.conf
This commit is contained in:
parent
f88412b7cd
commit
e93fbedcc7
1 changed files with 15 additions and 0 deletions
|
@ -1089,6 +1089,21 @@ class DragonFlyBsdService(FreeBsdService):
|
|||
platform = 'DragonFly'
|
||||
distribution = None
|
||||
|
||||
def service_enable(self):
|
||||
if self.enable:
|
||||
self.rcconf_value = "YES"
|
||||
else:
|
||||
self.rcconf_value = "NO"
|
||||
|
||||
rcfiles = ['/etc/rc.conf'] # Overkill?
|
||||
for rcfile in rcfiles:
|
||||
if os.path.isfile(rcfile):
|
||||
self.rcconf_file = rcfile
|
||||
|
||||
self.rcconf_key = "%s" % string.replace(self.name, "-", "_")
|
||||
|
||||
return self.service_enable_rcconf()
|
||||
|
||||
|
||||
class OpenBsdService(Service):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue