check_xbps.py: added "configure" package state

This commit is contained in:
Sven Velt 2016-12-26 22:58:22 +01:00
parent 21b7b687a0
commit 7d476d9109

View file

@ -140,7 +140,7 @@ elif rc not in [0, 6]:
# RC 6: Package(s) already installed
plugin.back2nagios(plugin.RETURNCODE['WARNING'], 'Unknown returncode "%s", please contact the author of plugin or open an issue!' % rc)
action = {'remove':[], 'update':[], 'install':[],}
action = {'remove':[], 'update':[], 'install':[], 'configure':[]}
arch = {}
repo = {}
downby = 0L
@ -176,13 +176,13 @@ if len(sout) == 0:
else:
out = []
multiline = []
for act in ['update', 'install', 'remove']:
for act in ['update', 'install', 'remove', 'configure']:
pkgs = action.pop(act)
pkgs.sort()
l = len(pkgs)
out.append('%s package%s to %s' % (l, l != 1 and 's' or '', act) )
l and multiline.append('%s(%s): %s' % (act, l, ', '.join(pkgs)) )
for act in action:
for act in action.keys():
pkgs = action.pop(act)
pkgs.sort()
l = len(pkgs)