- Fixed rsync is case of shareName = '/'
- Repaired host name regex to correctly allow '-' in host name
- Added sshPath to Pre/Post command vars
- Ensured child exited after failed exec for Pre/Post commands
- Added space before $I_option in Smb.
- Made $I_option a listref, rather than string, for Smb
s/[\n\r]+//;
s/#.*//;
s/\s+$//;
- next if ( /^\s*$/ || !/^([\w\.-\\]+\s+.*)/ );
+ next if ( /^\s*$/ || !/^([\w\.\\-]+\s+.*)/ );
#
# Split on white space, except if preceded by \
# using zero-width negative look-behind assertion
close(STDERR);
open(STDERR, ">&STDOUT");
exec(@$cmd);
+ print("Exec of @$cmd failed\n");
+ exit(1);
}
#
# The parent gathers the output from the child
#
# We add a slash to the share name we pass to rsync
#
- ($t->{shareNameSlash} = "$t->{shareName}/") =~ s{//+$}{};
+ ($t->{shareNameSlash} = "$t->{shareName}/") =~ s{//+$}{/};
if ( $t->{type} eq "restore" ) {
$rsyncClientCmd = $conf->{RsyncClientRestoreCmd};
my($t) = @_;
my $bpc = $t->{bpc};
my $conf = $t->{conf};
- my $I_option = $t->{hostIP} eq $t->{host} ? "" : " -I $t->{hostIP}";
+ my $I_option = $t->{hostIP} eq $t->{host} ? [] : ['-I', $t->{hostIP}];
my(@fileList, $X_option, $smbClientCmd, $logMsg);
my($timeStampFile);
local(*SMB);