Index: flexbackup =================================================================== --- flexbackup (.../tags/flexbackup-1.2.1-r5/flexbackup) (revision 768) +++ flexbackup (.../trunk/flexbackup) (revision 768) @@ -1301,8 +1301,8 @@ $cmd .= "$::unz"; } $cmd .= "("; - $cmd .= "mkdir -p $::device ; "; - $cmd .= "cd $::device ; "; + $cmd .= "mkdir -p \"$::device\" ; "; + $cmd .= "cd \"$::device\" ; "; $cmd .= "$::path{cpio} -i "; $cmd .= "-m "; $cmd .= "-d "; @@ -1351,9 +1351,8 @@ # Have to take leading './' off to make rsync's include/exclude work right $cmd .= " | $::path{sed} -e \"s/\\.\\///g\" | "; - $cmd .= "$::path{rsync} "; - $cmd .= "--include-from=- --exclude=* "; + $cmd .= "--files-from=- "; $cmd .= "--archive "; $cmd .= "$::rsync_verb_flag "; $cmd .= "--delete --delete-excluded "; @@ -1368,7 +1367,7 @@ $cmd .= "$remote:"; } } - $cmd .= "$dir/ $::device"; + $cmd .= "\"$dir/\" \"$::device\""; push(@cmds, $cmd); @@ -4894,9 +4893,10 @@ $rex .= '\)"'; } # Show what the darn thing is constructing for prune expressions. - &log("| \"find\" regex for pruning is:"); - &log("| $rex"); - &line(); + my $temp = $rex; + $temp =~ s/\\([()|])/$1/g; + &log("| \"find\" regex for pruning (shell escaping omitted for clarity) is:"); + &log("| $temp"); $cmd .= '-regex ' . $rex . ' -prune -o '; } else { # Show what the darn thing is constructing for prune expressions. @@ -4906,6 +4906,7 @@ # don't have permissions on and are running as non-root) $cmd .= "-depth "; } + &line(); $cmd .= "$::mountpoint_flag "; $cmd .= "! -type s "; @@ -5301,12 +5302,14 @@ print $::msg "| Checking '$cfg::buffer' on this machine... "; $pipecmd = "sh $tmp_script "; } else { + $pipecmd = + "$::remoteshell $host '$::path{mkdir} -p $cfg::tmpdir'; " . + "cat $tmp_script | ($::remoteshell $host 'cat > $tmp_script; " . + "sh $tmp_script; rm -rf $cfg::tmpdir')"; print $::msg "| Checking '$cfg::buffer' on host $host... "; - $pipecmd = "$::remoteshell $host '$::path{mkdir} -p $cfg::tmpdir'; cat $tmp_script | ($::remoteshell $host 'cat > $tmp_script; sh $tmp_script; rm -rf $cfg::tmpdir')"; } if (!defined($::debug)) { - open(PIPE,"$pipecmd |") || die; $explicit_success = 0;