check_xbps.py: added "configure" package state
This commit is contained in:
parent
21b7b687a0
commit
7d476d9109
|
@ -140,7 +140,7 @@ elif rc not in [0, 6]:
|
||||||
# RC 6: Package(s) already installed
|
# 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)
|
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 = {}
|
arch = {}
|
||||||
repo = {}
|
repo = {}
|
||||||
downby = 0L
|
downby = 0L
|
||||||
|
@ -176,13 +176,13 @@ if len(sout) == 0:
|
||||||
else:
|
else:
|
||||||
out = []
|
out = []
|
||||||
multiline = []
|
multiline = []
|
||||||
for act in ['update', 'install', 'remove']:
|
for act in ['update', 'install', 'remove', 'configure']:
|
||||||
pkgs = action.pop(act)
|
pkgs = action.pop(act)
|
||||||
pkgs.sort()
|
pkgs.sort()
|
||||||
l = len(pkgs)
|
l = len(pkgs)
|
||||||
out.append('%s package%s to %s' % (l, l != 1 and 's' or '', act) )
|
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)) )
|
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 = action.pop(act)
|
||||||
pkgs.sort()
|
pkgs.sort()
|
||||||
l = len(pkgs)
|
l = len(pkgs)
|
||||||
|
|
Loading…
Reference in a new issue