X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Fscripts%2Fregress-win32.pl;h=6ecdc7c21dde0ba4556eee98ee0f7ef24f1d7d88;hb=d5189111dcd58f77691e748c57cb8fa9bb6384f8;hp=61ac530f8b506559292ab5693280b9e67e4230cc;hpb=6e9c33250485c3ae2e31e26901e917861ed5cc61;p=bacula%2Fbacula diff --git a/regress/scripts/regress-win32.pl b/regress/scripts/regress-win32.pl index 61ac530f8b..6ecdc7c21d 100644 --- a/regress/scripts/regress-win32.pl +++ b/regress/scripts/regress-win32.pl @@ -39,6 +39,49 @@ bacula/ regress/ + This script requires perl to work (http://strawberryperl.com), and by default + it assumes that Bacula is installed in the standard location. Once it's + started on the windows, you can do remote commands like: + - start the service + - stop the service + - edit the bacula-fd.conf to change the director and password setting + - install a new binary version (not tested, no plugin support) + - create weird files and directories + - create files with windows attributes + - compare two directories (with md5) + + + To test it, you can follow this procedure + On the windows box: + - install perl from http://strawberryperl.com on windows + - copy or export regress directory somewhere on your windows + - start the regress/scripts/regress-win32.pl (open it with perl.exe) + - create c:/tmp (not sure it's mandatory) + - make sure that the firewall is well configured or just disabled (needs + bacula and 8091/tcp) + + On Linux box: + - edit config file to fill the following variables + + WIN32_CLIENT="win2008-fd" + # Client FQDN or IP address + WIN32_ADDR="192.168.0.6" + # File or Directory to backup. This is put in the "File" directive + # in the FileSet + WIN32_FILE="c:/tmp" + # Port of Win32 client + WIN32_PORT=9102 + # Win32 Client password + WIN32_PASSWORD="xxx" + # will be the ip address of the linux box + WIN32_STORE_ADDR="192.168.0.1" + + - type make setup + - run ./tests/backup-bacula-test to be sure that everything is ok + - start ./tests/win32-fd-test + + I'm not very happy with this script, but it works :) + =cut use strict; @@ -249,19 +292,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; }