optimize openbsd pkg_mgr fact discovery
This commit is contained in:
parent
44bd1db976
commit
2482c687b7
1 changed files with 5 additions and 4 deletions
|
@ -334,12 +334,13 @@ class Facts(object):
|
|||
self.facts[factname] = keydata.split()[1]
|
||||
|
||||
def get_pkg_mgr_facts(self):
|
||||
self.facts['pkg_mgr'] = 'unknown'
|
||||
for pkg in Facts.PKG_MGRS:
|
||||
if os.path.exists(pkg['path']):
|
||||
self.facts['pkg_mgr'] = pkg['name']
|
||||
if self.facts['system'] == 'OpenBSD':
|
||||
self.facts['pkg_mgr'] = 'openbsd_pkg'
|
||||
else:
|
||||
self.facts['pkg_mgr'] = 'unknown'
|
||||
for pkg in Facts.PKG_MGRS:
|
||||
if os.path.exists(pkg['path']):
|
||||
self.facts['pkg_mgr'] = pkg['name']
|
||||
|
||||
def get_service_mgr_facts(self):
|
||||
#TODO: detect more custom init setups like bootscripts, dmd, s6, Epoch, runit, etc
|
||||
|
|
Loading…
Reference in a new issue