.sys-Handler trying to use `debconf-get-selections` on CentOS 7
Hi,
I'm on CentOS 7, and I've got a job running that does daily backups of the system configuration using the .sys-Handler. Unfortunately, I get the following warning each time:
Warning: can't find debconf-get-selections, skipping package selection states. You might want to install the debconf-utils package.
I'm running CentOS Linux release 7.3.1611 (Core)
and backupninja 1.0.1-8.el7
from EPEL.
The concerned lines are lines 238-240 in sys.in, if I'm not mistaken. It seems that the code handling vservers assumes that those vservers are running Debian. And it looks like setting vservers = no
in the central config doesn't prevent it from going through the vservers loop, because this is the only place where this warning can be thrown.
Do you have any contribution guidelines that I could look at before I go and try to contribute a patch for this? :)
Here's my config …
$ sudo cat /etc/backup.d/10-sysinfo.sys
when = daily
packages = yes
partitions = no
dosfdisk = no
hardware = no
luksheaders = no
lvm = yes
packagesfile = /var/backups/packages.txt
# selectionsfile = /var/backups/debconfsel.txt
# partitionsfile = /var/backups/partitions.__star__.txt
# hardwarefile = /var/backups/hardware.txt
# luksheadersfile = /var/backups/luksheader.__star__.bin
# If vservers = yes in /etc/backupninja.conf then the following variables can
# be used:
# vsnames = all | <vserver1> <vserver2> ... (default = all)
… my /etc/backupninja.conf
…
loglevel = 3
reportemail = foo@bar.baz
reportsuccess = yes
reportinfo = yes
reportwarning = yes
reportspace = yes
reportdirectory = /var/lib/backupninja/reports
admingroup = root
logfile = /var/log/backupninja.log
configdirectory = /etc/backup.d
scriptdirectory = /usr/share/backupninja
libdirectory = /usr/libexec/backupninja
usecolors = yes
when = everyday at 03:42
vservers = no
… as well as the output when I do a test run of the action using ninjahelper
.
Debug: check_perms /etc/backup.d
Debug: perms: drwxr-x---
Debug: gperm: r-x
Debug: wperm: ---
Debug: check_perms /etc/backup.d/10-sysinfo.sys
Debug: perms: -rw-------
Debug: gperm: ---
Debug: wperm: ---
Info: >>>> starting action /etc/backup.d/10-sysinfo.sys (because of --now)
Debug: yes
Debug: executing handler in locked section controlled by /var/lock/backupninja/_etc_backup.d_10-sysinfo.sys
Debug: Redhat detected
which: no hwinfo in (/sbin:/bin:/usr/sbin:/usr/bin)
Debug: /bin/rpm -qa > /var/backups/packages.txt
Warning: can't find debconf-get-selections, skipping package selection states. You might want to install the debconf-utils package.
/usr/share/backupninja/sys: line 225: [: too many arguments
/usr/share/backupninja/sys: line 230: [: too many arguments
Getting information about the kernel.
Getting disk and filesystem information.
Debug: Let's try to gather the list of LVM volume groups
Debug: /sbin/vgs --options vg_name --noheadings | /usr/bin/sed 's/^[ ]*//' | /usr/bin/sed 's/[ ]*$//' | tr '
' ' '
File descriptor 200 (/run/lock/backupninja/_etc_backup.d_10-sysinfo.sys) leaked on vgs invocation. Parent PID 26275: /usr/bin/bash
Debug: Let's try to backup LVM metadata for detected volume groups: cl
Debug: /sbin/vgcfgbackup --file "/var/backups/lvm"/'%s' cl
File descriptor 200 (/run/lock/backupninja/_etc_backup.d_10-sysinfo.sys) leaked on vgcfgbackup invocation. Parent PID 26294: /usr/bin/bash
Debug: Volume group "cl" successfully backed up.
Info: LVM metadata was saved to /var/backups/lvm for volume groups: cl
Warning: <<<< finished action /etc/backup.d/10-sysinfo.sys: WARNING
Debug: send report to technik@igw.tuwien.ac.at
Info: FINISHED: 1 actions run. 0 fatal. 0 error. 1 warning.