On Sat, September 19, 2015 06:51, Tony Mountifield wrote: > In article > <d0000782c236fbee71045dad24a43def.squirrel at webmail.harte-lyne.ca>, James B. Byrne <byrnejb at harte-lyne.ca> wrote: >> After some experimenting I have observed that overriding settings from >> /usr/share/logwatch/default.conf/logwatch.conf in >> /etc/logwatch/conf/logwatch.conf does not produce consistent >> results. >> For example, if I replace the default detail configuration in >> etc/logwatch/conf/logwatch.conf with: >> Detail = High >> It does indeed change the level of detail from the default Low set in >> /usr/share/logwatch/default.conf/logwatch.conf. >> However, if I comment out the line: >> #Service = "-zz-sys" # Prevents execution of zz-sys service in the overridden file then the fact that this line remains in the default.conf version means that the sservice cannot be enabled to run >> by default without editing >> /usr/share/logwatch/default.conf/logwatch.conf. Of course doing that >> means that any update clobbers the local changes. > Can you just add it back in /etc/logwatch/conf/logwatch.conf with: Service = "zz-sys" > I haven't tried it, but it looks like Service lines are cumulative. /usr/sbin/logwatch --range 'today' --mailto support at harte-lyne.ca --service zz-runtime --service All Wrong configuration entry for "Service", if "All" selected, only "-" items are allowed As shown above, if you pass '--service All' then any later '--service X' option must be prefaced with a '-' ('--service -X'). In other words, once All is selected then one can only remove selected services. In the config files this is the order used: # The 'Service' option expects either the name of a filter # (in /usr/share/logwatch/scripts/services/*) or 'All'. # The default service(s) to report on. This should be left as All for # most people. Service = All # You can also disable certain services (when specifying all) Service = "-zz-network" # Prevents execution of zz-network service, which # prints useful network configuration info. Service = "-zz-sys" # Prevents execution of zz-sys service, which # prints useful system configuration info. Service = "-eximstats" # Prevents execution of eximstats service, which # is a wrapper for the eximstats program. So, no, one cannot restore a service that is deleted from the run in default.conf by adding it back to the local config file. I can understand what is happening here. The implementation of user config files is conceived as being additive to the default configuration. Anything not specified in /etc/logwatch/conf/logwatch.conf is picked up from /usr/share/logwatch/default.conf/logwatch.conf. Anything in /usr/share/logwatch/default.conf/logwatch.conf is overridden by any similar entry in an earlier config. This implies that the order of processing is: /etc/logwatch/conf/logwatch.conf /usr/share/logwatch/dist.conf /usr/share/logwatch/default.conf/logwatch.conf This seems to be something that needs to be fixed in the default.conf/logwatch.conf file. -- *** e-Mail is NOT a SECURE channel *** Do NOT transmit sensitive data via e-Mail James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3