From 84fca2911d65301390f33564e3c9f550b8ebcef6 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Wed, 24 Feb 2010 10:49:06 +0100 Subject: [PATCH] regress: fix regress-win32 prog to handle monitor section in bacula-fd.conf --- regress/scripts/regress-win32.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/regress/scripts/regress-win32.pl b/regress/scripts/regress-win32.pl index 61ac530f8b..e77b495d15 100644 --- a/regress/scripts/regress-win32.pl +++ b/regress/scripts/regress-win32.pl @@ -249,19 +249,21 @@ sub set_director_name open(ORG, "$conf/bacula-fd.conf") or return "ERR\nORG $!\n"; open(NEW, ">$conf/bacula-fd.conf.new") or return "ERR\nNEW $!\n"; - my $in_dir=0; + my $in_dir=0; # don't use monitoring section + my $nb_dir=""; while (my $l = ) { if ($l =~ /^\s*Director\s+{/i) { print NEW $l; $in_dir = 1; } elsif ($l =~ /^(\s*)Name\s*=/ and $in_dir) { - print NEW "${1}Name=$name\n"; + print NEW "${1}Name=$name$nb_dir\n"; } elsif ($l =~ /^(\s*)Password\s*=/ and $in_dir) { print NEW "${1}Password=$pass\n"; } elsif ($l =~ /\s*}/ and $in_dir) { print NEW $l; $in_dir = 0; + $nb_dir++; } else { print NEW $l; } -- 2.39.5