Turn badvar into a real tuple.
This commit is contained in:
parent
4b97d7fb54
commit
ea664cb7c7
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.53 2015/01/06 15:27:24 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.54 2015/01/06 17:45:51 ajacoutot Exp $
|
||||
|
||||
# optional dependencies
|
||||
# https://github.com/saltstack/salt/blob/develop/doc/conf.py#L42
|
||||
@ -18,7 +18,7 @@ COMMENT = remote execution and configuration management system
|
||||
|
||||
MODPY_EGG_VERSION = 2014.1.13
|
||||
DISTNAME = salt-${MODPY_EGG_VERSION}
|
||||
REVISION = 1
|
||||
REVISION = 2
|
||||
|
||||
CATEGORIES = sysutils net devel
|
||||
|
||||
@ -61,7 +61,7 @@ pre-configure:
|
||||
# https://github.com/saltstack/salt/commit/81857ea0743f2fd475789044a11310eec7a6d4fc
|
||||
# https://github.com/saltstack/salt/commit/3737b08e0d201ab33949f1fc5bc930e0ba2b6fee
|
||||
# https://github.com/saltstack/salt/commit/400303e4e92db1820e4aad9c5a9d40f0eac311ab
|
||||
# https://github.com/saltstack/salt/pull/19385
|
||||
# https://github.com/saltstack/salt/commit/1a04c83a3d076cd457d66d4da64418e2d27d3451
|
||||
cp ${FILESDIR}/openbsdrcctl.py ${WRKSRC}/salt/modules/
|
||||
# https://github.com/saltstack/salt/commit/edcea17892bc8f6c4eec8441db366878ee2cd2bd
|
||||
# https://github.com/saltstack/salt/commit/3cc9fcae4362ab9ccd3c6d3ff1d709da9a11743c
|
||||
|
@ -90,12 +90,12 @@ def get_all():
|
||||
|
||||
salt '*' service.get_all
|
||||
'''
|
||||
badvar = [ "_timeout", "_user" ]
|
||||
badvar = ("_timeout", "_user")
|
||||
ret = []
|
||||
service = _cmd()
|
||||
for svc in __salt__['cmd.run']('{0} getall'.format(service)).splitlines():
|
||||
svc = re.sub('(_flags|)=.*$', '', svc)
|
||||
if not svc.endswith(tuple(badvar)):
|
||||
if not svc.endswith(badvar):
|
||||
ret.append(svc)
|
||||
return sorted(ret)
|
||||
|
||||
@ -110,13 +110,13 @@ def get_disabled():
|
||||
|
||||
salt '*' service.get_disabled
|
||||
'''
|
||||
badvar = [ "_timeout", "_user" ]
|
||||
badvar = ("_timeout", "_user")
|
||||
ret = []
|
||||
service = _cmd()
|
||||
for svc in __salt__['cmd.run']('{0} getall'.format(service)).splitlines():
|
||||
if svc.endswith("=NO"):
|
||||
svc = re.sub('(_flags|)=.*$', '', svc)
|
||||
if not svc.endswith(tuple(badvar)):
|
||||
if not svc.endswith(badvar):
|
||||
ret.append(svc)
|
||||
return sorted(ret)
|
||||
|
||||
@ -131,13 +131,13 @@ def get_enabled():
|
||||
|
||||
salt '*' service.get_enabled
|
||||
'''
|
||||
badvar = [ "_timeout", "_user" ]
|
||||
badvar = ("_timeout", "_user")
|
||||
ret = []
|
||||
service = _cmd()
|
||||
for svc in __salt__['cmd.run']('{0} getall'.format(service)).splitlines():
|
||||
if not svc.endswith("=NO"):
|
||||
svc = re.sub('(_flags|)=.*$', '', svc)
|
||||
if not svc.endswith(tuple(badvar)):
|
||||
if not svc.endswith(badvar):
|
||||
ret.append(svc)
|
||||
return sorted(ret)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user