Package: debsecan
Version: 0.4.14
Severity: wishlist
Tags: patch

Hi,

if debsecan reads the config file before it checks the validity of the
options, the suite option must not be set at command line, but its value
is read from the config file. This way I can add the option --only-fixed
to the call in the cron script, without the need to set the option
--suite.

diff --git a/debsecan b/debsecan
index 7ef7deb..dc45de7 100755
--- a/debsecan
+++ b/debsecan
@@ -353,6 +353,13 @@ def parse_cli():
 
     process_whitelist_options()
 
+    config = read_config(options.config)
+    if options.cron and not options.mailto:
+        options.mailto = config.get('MAILTO', '')
+        if options.mailto == '':
+            options.mailto = 'root'
+    options.suite = options.suite or config.get('SUITE', None)
+
     if options.cron:
         options.format = 'report'
         options.update_history = True
@@ -373,12 +380,6 @@ def parse_cli():
         sys.exit(1)
     options.need_history = options.format == 'report'
 
-    config = read_config(options.config)
-    if options.cron and not options.mailto:
-        options.mailto = config.get('MAILTO', '')
-        if options.mailto == '':
-            options.mailto = 'root'
-    options.suite = options.suite or config.get('SUITE', None)
     if options.suite == 'GENERIC':
         options.suite = None
     options.subject = config.get(

-- System Information:
Debian Release: unstable/experimental
  APT prefers unstable
  APT policy: (900, 'unstable'), (700, 'experimental')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.34
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages debsecan depends on:
ii  debconf [debconf-2.0]         1.5.32     Debian configuration management sy
ii  python                        2.6.5-5    An interactive high-level object-o
ii  python-apt                    0.7.95     Python interface to libapt-pkg

Versions of packages debsecan recommends:
ii  cron                          3.0pl1-113 process scheduling daemon
ii  exim4                         4.72-1     metapackage to ease Exim MTA (v4) 
ii  exim4-daemon-light [mail-tran 4.72-1     lightweight Exim MTA (v4) daemon

debsecan suggests no packages.

-- Configuration Files:
/etc/default/debsecan changed [not included]

-- debconf information excluded

Attachment: signature.asc
Description: Digital signature http://en.wikipedia.org/wiki/OpenPGP

Reply via email to