INN commit: trunk (3 files)
INN Commit
Russ_Allbery at isc.org
Sat Apr 4 12:56:54 UTC 2009
Date: Saturday, April 4, 2009 @ 05:56:54
Author: iulius
Revision: 8405
Silent innupgrade when reaching a parameter which expects
a list value.
Modified:
trunk/scripts/innupgrade.in
trunk/tests/data/upgrade/inn.conf
trunk/tests/data/upgrade/inn.conf.ok
--------------------------------+
scripts/innupgrade.in | 10 ++++++++++
tests/data/upgrade/inn.conf | 1 +
tests/data/upgrade/inn.conf.ok | 1 +
3 files changed, 12 insertions(+)
Modified: scripts/innupgrade.in
===================================================================
--- scripts/innupgrade.in 2009-04-04 10:54:53 UTC (rev 8404)
+++ scripts/innupgrade.in 2009-04-04 12:56:54 UTC (rev 8405)
@@ -52,6 +52,7 @@
for $raw (@$input) {
$_ = $raw;
$line++;
+ # Commented or blank lines.
if (/^\s*\#/ || /^\s*$/) {
push (@$output, $_);
next;
@@ -62,12 +63,21 @@
push (@$output, $_);
next;
}
+
my ($indent, $key, $space, $value) = ($1, $2, $3, $4);
+
+ # Empty value.
if ($value eq '') {
push (@$output, "#$_\n");
next;
}
+ # A list value (on only one line).
+ if ($value =~ /^\[/) {
+ push (@$output, "$_\n");
+ next;
+ }
+
$hismethod = 1 if $key eq 'hismethod';
if ($key eq 'nntpactsync') {
Modified: tests/data/upgrade/inn.conf
===================================================================
--- tests/data/upgrade/inn.conf 2009-04-04 10:54:53 UTC (rev 8404)
+++ tests/data/upgrade/inn.conf 2009-04-04 12:56:54 UTC (rev 8405)
@@ -2,5 +2,6 @@
mta: /usr/lib/sendmail -oi -oem %s
nntpactsync: 200
+listvalue: [ one two three ]
# testing comment
Modified: tests/data/upgrade/inn.conf.ok
===================================================================
--- tests/data/upgrade/inn.conf.ok 2009-04-04 10:54:53 UTC (rev 8404)
+++ tests/data/upgrade/inn.conf.ok 2009-04-04 12:56:54 UTC (rev 8405)
@@ -2,6 +2,7 @@
mta: "/usr/lib/sendmail -oi -oem %s"
incominglogfrequency: 200
+listvalue: [ one two three ]
# testing comment
More information about the inn-committers
mailing list