1 |
slords |
1.1 |
--- e-smith-backup-2.0.0/root/etc/e-smith/events/actions/workstation-backup-dar.verbose 2008-10-21 14:12:17.000000000 -0600 |
2 |
|
|
+++ e-smith-backup-2.0.0/root/etc/e-smith/events/actions/workstation-backup-dar 2008-10-21 14:11:56.000000000 -0600 |
3 |
|
|
@@ -323,7 +323,6 @@ |
4 |
|
|
chdir '/'; |
5 |
|
|
#fork && exit; |
6 |
|
|
|
7 |
|
|
- warn "Dar killer $$ started for PID $darpid with gracetime $gracetime\n"; |
8 |
|
|
# wait for timeout or backup termination |
9 |
|
|
while ($tick > 0) { |
10 |
|
|
sleep 10; |
11 |
|
|
@@ -332,9 +331,9 @@ |
12 |
|
|
} |
13 |
|
|
|
14 |
|
|
if (kill(0, $darpid)) { |
15 |
|
|
- do { |
16 |
|
|
- warn "Cleanly stops $darpid dar process\n"; |
17 |
|
|
- } while (kill('QUIT', $darpid) != 1); |
18 |
|
|
+ while (kill('QUIT', $darpid) != 1) { |
19 |
|
|
+ warn "Failed to stop $darpid dar process\n"; |
20 |
|
|
+ } |
21 |
|
|
} |
22 |
|
|
warn "Partial backup stored on backup workstation.\n", |
23 |
|
|
"Session cleanly closed by timeout after $timeout seconds.\n", |
24 |
|
|
@@ -350,8 +349,7 @@ |
25 |
|
|
my $killerpid = undef; |
26 |
|
|
|
27 |
|
|
eval { |
28 |
|
|
- ($pid = open INPUT, "-|", "/usr/bin/dar", "--create", "$tmpdir/$id/$bkname", split(/\s+/,$ref), "-B", "/etc/dar/$job.dcf") or ldie("cannot start : $!" ); |
29 |
|
|
- warn "Running dar backup with PID $pid\n"; |
30 |
|
|
+ ($pid = open INPUT, "-|", "/usr/bin/dar", "-Q", "--create", "$tmpdir/$id/$bkname", split(/\s+/,$ref), "-B", "/etc/dar/$job.dcf") or ldie("cannot start : $!" ); |
31 |
|
|
|
32 |
|
|
if ($pid) { |
33 |
|
|
$killerpid = start_dar_killer($pid, $timeout); } |
34 |
|
|
@@ -361,9 +359,9 @@ |
35 |
|
|
$report .= $data; |
36 |
|
|
|
37 |
|
|
if ($killerpid && kill(0, $killerpid)) { |
38 |
|
|
- do { |
39 |
|
|
- warn "Killing killer $killerpid\n"; |
40 |
|
|
- } while (kill(9, $killerpid) != 1); |
41 |
|
|
+ while (kill(9, $killerpid) != 1) { |
42 |
|
|
+ warn "Failed to kill $killerpid killer process\n"; |
43 |
|
|
+ } |
44 |
|
|
|
45 |
|
|
waitpid($killerpid, 0); |
46 |
|
|
} |