1 |
wellsi |
1.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 |
wellsi |
1.2 |
--- e-smith-backup-2.2.0.old/root/etc/e-smith/events/actions/workstation-backup-dar 2014-01-11 08:59:09.000000000 -0800 |
3 |
|
|
+++ e-smith-backup-2.2.0/root/etc/e-smith/events/actions/workstation-backup-dar 2014-01-11 15:06:56.000000000 -0800 |
4 |
|
|
@@ -401,15 +401,18 @@ |
5 |
wellsi |
1.1 |
my @bknum; |
6 |
|
|
my @setd; |
7 |
|
|
my @bkname; |
8 |
|
|
-open(DAR_LIST, "/usr/bin/dar_manager -Q -B $catalog -l |"); |
9 |
wellsi |
1.2 |
+my $pid = open (DAR_LIST, "-|", "/usr/bin/dar_manager", "-Q", "-B", "$catalog", "-l") or ldie ("Cannot start : $!"); |
10 |
wellsi |
1.1 |
while (<DAR_LIST>) |
11 |
|
|
{ |
12 |
wellsi |
1.2 |
- next unless ($_ =~ /set/); |
13 |
|
|
- chomp; |
14 |
|
|
- ($bknum[$i], $setd[$i], $bkname[$i]) = split(' ', $_, 3); |
15 |
|
|
- $i++; |
16 |
|
|
+ next unless ($_ =~ /set/); |
17 |
|
|
+ chomp; |
18 |
|
|
+ ($bknum[$i], $setd[$i], $bkname[$i]) = split(' ', $_, 3); |
19 |
|
|
+ $i++; |
20 |
|
|
} |
21 |
|
|
+waitpid ($pid, 0); |
22 |
|
|
+$err = WEXITSTATUS($?); |
23 |
|
|
close (DAR_LIST); |
24 |
|
|
+ldie ("Catalog error : $err") if $err; |
25 |
|
|
|
26 |
|
|
# delete from catalog old removed backups |
27 |
|
|
|