1 |
stephdl |
1.1 |
diff -Nur e-smith-backup-2.4.0.old8502/root/etc/e-smith/events/actions/workstation-backup-dar e-smith-backup-2.4.0.bz8502/root/etc/e-smith/events/actions/workstation-backup-dar |
2 |
|
|
--- e-smith-backup-2.4.0.old8502/root/etc/e-smith/events/actions/workstation-backup-dar 2015-02-02 19:24:27.861590554 +0100 |
3 |
|
|
+++ e-smith-backup-2.4.0.bz8502/root/etc/e-smith/events/actions/workstation-backup-dar 2015-02-02 19:26:58.768976468 +0100 |
4 |
|
|
@@ -307,7 +307,18 @@ |
5 |
|
|
{ |
6 |
|
|
# check if $mountdir is mounted |
7 |
|
|
my $mountdir = shift; |
8 |
|
|
- return system("/bin/mountpoint", "-q", "$mountdir"); |
9 |
|
|
+ $|=1; # Auto-flush |
10 |
|
|
+ |
11 |
|
|
+ # copy STDOUT to another filehandle |
12 |
|
|
+ open (my $STDOLD, '>&', STDOUT); |
13 |
|
|
+ |
14 |
|
|
+ open(STDOUT, ">/dev/null"); |
15 |
|
|
+ if ( open(MOUNTDIR, "|-", "/bin/findmnt", $mountdir)){;} |
16 |
|
|
+ |
17 |
|
|
+ # restore STDOUT |
18 |
|
|
+ open (STDOUT, '>&', $STDOLD); |
19 |
|
|
+ |
20 |
|
|
+ return (!close(MOUNTDIR)); |
21 |
|
|
} |
22 |
|
|
|
23 |
|
|
|
24 |
|
|
diff -Nur e-smith-backup-2.4.0.old8502/root/etc/e-smith/web/functions/backup e-smith-backup-2.4.0.bz8502/root/etc/e-smith/web/functions/backup |
25 |
|
|
--- e-smith-backup-2.4.0.old8502/root/etc/e-smith/web/functions/backup 2015-02-02 19:24:27.866589561 +0100 |
26 |
|
|
+++ e-smith-backup-2.4.0.bz8502/root/etc/e-smith/web/functions/backup 2015-02-02 19:29:26.232145517 +0100 |
27 |
|
|
@@ -3123,7 +3123,18 @@ |
28 |
|
|
{ |
29 |
|
|
# check if $mountdir is mounted |
30 |
|
|
my $mountdir = shift; |
31 |
|
|
- return system("/bin/mountpoint", "-q", "$mountdir"); |
32 |
|
|
+ $|=1; # Auto-flush |
33 |
|
|
+ |
34 |
|
|
+ # copy STDOUT to another filehandle |
35 |
|
|
+ open (my $STDOLD, '>&', STDOUT); |
36 |
|
|
+ |
37 |
|
|
+ open(STDOUT, ">/dev/null"); |
38 |
|
|
+ if ( open(MOUNTDIR, "|-", "/bin/findmnt", $mountdir)){;} |
39 |
|
|
+ |
40 |
|
|
+ # restore STDOUT |
41 |
|
|
+ open (STDOUT, '>&', $STDOLD); |
42 |
|
|
+ |
43 |
|
|
+ return (!close(MOUNTDIR)); |
44 |
|
|
} |
45 |
|
|
|
46 |
|
|
sub bmount |