Lines 1301-1308
Link Here
|
1301 |
$cmd .= "$::unz"; |
1301 |
$cmd .= "$::unz"; |
1302 |
} |
1302 |
} |
1303 |
$cmd .= "("; |
1303 |
$cmd .= "("; |
1304 |
$cmd .= "mkdir -p $::device ; "; |
1304 |
$cmd .= "mkdir -p \"$::device\" ; "; |
1305 |
$cmd .= "cd $::device ; "; |
1305 |
$cmd .= "cd \"$::device\" ; "; |
1306 |
$cmd .= "$::path{cpio} -i "; |
1306 |
$cmd .= "$::path{cpio} -i "; |
1307 |
$cmd .= "-m "; |
1307 |
$cmd .= "-m "; |
1308 |
$cmd .= "-d "; |
1308 |
$cmd .= "-d "; |
Lines 1351-1359
Link Here
|
1351 |
|
1351 |
|
1352 |
# Have to take leading './' off to make rsync's include/exclude work right |
1352 |
# Have to take leading './' off to make rsync's include/exclude work right |
1353 |
$cmd .= " | $::path{sed} -e \"s/\\.\\///g\" | "; |
1353 |
$cmd .= " | $::path{sed} -e \"s/\\.\\///g\" | "; |
1354 |
|
|
|
1355 |
$cmd .= "$::path{rsync} "; |
1354 |
$cmd .= "$::path{rsync} "; |
1356 |
$cmd .= "--include-from=- --exclude=* "; |
1355 |
$cmd .= "--files-from=- "; |
1357 |
$cmd .= "--archive "; |
1356 |
$cmd .= "--archive "; |
1358 |
$cmd .= "$::rsync_verb_flag "; |
1357 |
$cmd .= "$::rsync_verb_flag "; |
1359 |
$cmd .= "--delete --delete-excluded "; |
1358 |
$cmd .= "--delete --delete-excluded "; |
Lines 1368-1374
Link Here
|
1368 |
$cmd .= "$remote:"; |
1367 |
$cmd .= "$remote:"; |
1369 |
} |
1368 |
} |
1370 |
} |
1369 |
} |
1371 |
$cmd .= "$dir/ $::device"; |
1370 |
$cmd .= "\"$dir/\" \"$::device\""; |
1372 |
|
1371 |
|
1373 |
push(@cmds, $cmd); |
1372 |
push(@cmds, $cmd); |
1374 |
|
1373 |
|
Lines 4894-4902
Link Here
|
4894 |
$rex .= '\)"'; |
4893 |
$rex .= '\)"'; |
4895 |
} |
4894 |
} |
4896 |
# Show what the darn thing is constructing for prune expressions. |
4895 |
# Show what the darn thing is constructing for prune expressions. |
4897 |
&log("| \"find\" regex for pruning is:"); |
4896 |
my $temp = $rex; |
4898 |
&log("| $rex"); |
4897 |
$temp =~ s/\\([()|])/$1/g; |
4899 |
&line(); |
4898 |
&log("| \"find\" regex for pruning (shell escaping omitted for clarity) is:"); |
|
|
4899 |
&log("| $temp"); |
4900 |
$cmd .= '-regex ' . $rex . ' -prune -o '; |
4900 |
$cmd .= '-regex ' . $rex . ' -prune -o '; |
4901 |
} else { |
4901 |
} else { |
4902 |
# Show what the darn thing is constructing for prune expressions. |
4902 |
# Show what the darn thing is constructing for prune expressions. |
Lines 4906-4911
Link Here
|
4906 |
# don't have permissions on and are running as non-root) |
4906 |
# don't have permissions on and are running as non-root) |
4907 |
$cmd .= "-depth "; |
4907 |
$cmd .= "-depth "; |
4908 |
} |
4908 |
} |
|
|
4909 |
&line(); |
4909 |
|
4910 |
|
4910 |
$cmd .= "$::mountpoint_flag "; |
4911 |
$cmd .= "$::mountpoint_flag "; |
4911 |
$cmd .= "! -type s "; |
4912 |
$cmd .= "! -type s "; |
Lines 5301-5312
Link Here
|
5301 |
print $::msg "| Checking '$cfg::buffer' on this machine... "; |
5302 |
print $::msg "| Checking '$cfg::buffer' on this machine... "; |
5302 |
$pipecmd = "sh $tmp_script "; |
5303 |
$pipecmd = "sh $tmp_script "; |
5303 |
} else { |
5304 |
} else { |
|
|
5305 |
$pipecmd = |
5306 |
"$::remoteshell $host '$::path{mkdir} -p $cfg::tmpdir'; " . |
5307 |
"cat $tmp_script | ($::remoteshell $host 'cat > $tmp_script; " . |
5308 |
"sh $tmp_script; rm -rf $cfg::tmpdir')"; |
5304 |
print $::msg "| Checking '$cfg::buffer' on host $host... "; |
5309 |
print $::msg "| Checking '$cfg::buffer' on host $host... "; |
5305 |
$pipecmd = "$::remoteshell $host '$::path{mkdir} -p $cfg::tmpdir'; cat $tmp_script | ($::remoteshell $host 'cat > $tmp_script; sh $tmp_script; rm -rf $cfg::tmpdir')"; |
|
|
5306 |
} |
5310 |
} |
5307 |
|
5311 |
|
5308 |
if (!defined($::debug)) { |
5312 |
if (!defined($::debug)) { |
5309 |
|
|
|
5310 |
open(PIPE,"$pipecmd |") || die; |
5313 |
open(PIPE,"$pipecmd |") || die; |
5311 |
|
5314 |
|
5312 |
$explicit_success = 0; |
5315 |
$explicit_success = 0; |