From 37a841a05a62d042b1a2fe12488aa39f23f24f26 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 11 Mar 2010 18:14:48 +0100 Subject: [PATCH] regress: cleanup bweb tables when starting bacula --- regress/scripts/functions.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/regress/scripts/functions.pm b/regress/scripts/functions.pm index 337074791d..5838a090a7 100644 --- a/regress/scripts/functions.pm +++ b/regress/scripts/functions.pm @@ -100,9 +100,15 @@ sub cleanup sub start_bacula { + my $ret; $ENV{LANG}='C'; system("$bin/bacula start"); - return $? == 0; + $ret = $? == 0; + open(FP, ">$tmp/bcmd"); + print FP "sql\ntruncate client_group;\ntruncate client_group_member;\nupdate Media set LocationId=0;\ntruncate location;\n\n"; + close(FP); + system("cat $tmp/bcmd | $bin/bconsole >/dev/null"); + return $ret; } sub stop_bacula -- 2.39.5