/[smeserver]/rpms/e-smith-backup/sme9/e-smith-backup-2.4.0.change_method_checkMount_to_findmnt.patch
ViewVC logotype

Annotation of /rpms/e-smith-backup/sme9/e-smith-backup-2.4.0.change_method_checkMount_to_findmnt.patch

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


Revision 1.1 - (hide annotations) (download)
Mon Feb 2 18:38:45 2015 UTC (9 years, 9 months ago) by stephdl
Branch: MAIN
CVS Tags: e-smith-backup-2_4_0-42_el6_sme, e-smith-backup-2_4_0-46_el6_sme, e-smith-backup-2_4_0-44_el6_sme, e-smith-backup-2_4_0-41_el6_sme, e-smith-backup-2_4_0-45_el6_sme, e-smith-backup-2_4_0-43_el6_sme, HEAD
* Mon Feb 2 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 2.4.0-41.sme
- Change the sub checkMount() to findmnt
- Ian Wells <esmith@wellsi.com>

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

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