/[smeserver]/rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-CheckDarReturnCode.patch
ViewVC logotype

Contents of /rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-CheckDarReturnCode.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Fri Mar 11 16:25:35 2011 UTC (13 years, 2 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-backup-2_2_0-62_el5_sme, e-smith-backup-2_2_0-72_el5_sme, e-smith-backup-2_2_0-60_el5_sme, e-smith-backup-2_2_0-66_el5_sme, e-smith-backup-2_2_0-65_el5_sme, e-smith-backup-2_2_0-80_el5_sme, e-smith-backup-2_2_0-83_el5_sme, e-smith-backup-2_2_0-52_el5_sme, e-smith-backup-2_2_0-82_el5_sme, e-smith-backup-2_2_0-88_el5_sme, e-smith-backup-2_2_0-74_el5_sme, e-smith-backup-2_2_0-55_el5_sme, e-smith-backup-2_2_0-84_el5_sme, e-smith-backup-2_2_0-63_el5_sme, e-smith-backup-2_2_0-87_el5_sme, e-smith-backup-2_2_0-64_el5_sme, e-smith-backup-2_2_0-48_el5_sme, e-smith-backup-2_2_0-81_el5_sme, e-smith-backup-2_2_0-68_el5_sme, e-smith-backup-2_2_0-86_el5_sme, e-smith-backup-2_2_0-50_el5_sme, e-smith-backup-2_2_0-51_el5_sme, e-smith-backup-2_2_0-71_el5_sme, e-smith-backup-2_2_0-61_el5_sme, e-smith-backup-2_2_0-57_el5_sme, e-smith-backup-2_2_0-78_el5_sme, e-smith-backup-2_2_0-73_el5_sme, e-smith-backup-2_2_0-79_el5_sme, e-smith-backup-2_2_0-75_el5_sme, e-smith-backup-2_2_0-76_el5_sme, e-smith-backup-2_2_0-56_el5_sme, e-smith-backup-2_2_0-58_el5_sme, e-smith-backup-2_2_0-59_el5_sme, e-smith-backup-2_2_0-53_el5_sme, e-smith-backup-2_2_0-67_el5_sme, e-smith-backup-2_2_0-70_el5_sme, e-smith-backup-2_2_0-77_el5_sme, e-smith-backup-2_2_0-54_el5_sme, e-smith-backup-2_2_0-85_el5_sme, e-smith-backup-2_2_0-69_el5_sme, e-smith-backup-2_2_0-49_el5_sme, e-smith-backup-2_2_0-47_el5_sme, HEAD
Backup to Workstation does not handle full remote disc gracefully, by Filippo Carletti [SME: 6355]

1 diff -ruN e-smith-backup-2.2.0.old/root/etc/e-smith/events/actions/workstation-backup-dar e-smith-backup-2.2.0/root/etc/e-smith/events/actions/workstation-backup-dar
2 --- e-smith-backup-2.2.0.old/root/etc/e-smith/events/actions/workstation-backup-dar 2011-03-11 16:19:35.000000000 +0000
3 +++ e-smith-backup-2.2.0/root/etc/e-smith/events/actions/workstation-backup-dar 2011-03-11 16:20:10.000000000 +0000
4 @@ -27,6 +27,7 @@
5 use Time::localtime;
6 use File::Copy;
7 use File::Path;
8 +use POSIX ":sys_wait_h";
9 use esmith::ConfigDB;
10
11 sub ldie;
12 @@ -292,7 +293,11 @@
13
14 # launching dar backup
15
16 -run_backup();
17 +my $rc = run_backup();
18 +if ($rc != 0)
19 +{
20 + ldie("Error while running dar: $rc");
21 +}
22
23 if ($incnum == 0)
24 {
25 @@ -379,7 +384,7 @@
26 $tick--;
27 exit unless (kill(0, $darpid));
28 }
29 -
30 +
31 if (kill(0, $darpid)) {
32 while (kill('QUIT', $darpid) != 1) {
33 warn "Failed to stop $darpid dar process\n";
34 @@ -404,10 +409,9 @@
35 if ($pid) {
36 $killerpid = start_dar_killer($pid, $timeout); }
37 $data = do { local($/); <INPUT> };
38 - close(INPUT);
39 };
40 $report .= $data;
41 -
42 +
43 if ($killerpid && kill(0, $killerpid)) {
44 while (kill(9, $killerpid) != 1) {
45 warn "Failed to kill $killerpid killer process\n";
46 @@ -416,5 +420,8 @@
47 waitpid($killerpid, 0);
48 }
49
50 - return;
51 + waitpid($pid, 0);
52 + my $code = WEXITSTATUS($?);
53 + close(INPUT);
54 + return $code;
55 }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed