/[smeserver]/rpms/e-smith-backup/sme10/e-smith-backup-2.6.0.bz9090.Testing_the_remote_host_parameters.patch
ViewVC logotype

Contents of /rpms/e-smith-backup/sme10/e-smith-backup-2.6.0.bz9090.Testing_the_remote_host_parameters.patch

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


Revision 1.1 - (show annotations) (download)
Sun Jul 31 07:26:33 2016 UTC (7 years, 9 months ago) by stephdl
Branch: MAIN
CVS Tags: e-smith-backup-2_6_0-24_el7_sme, e-smith-backup-2_6_0-19_el7_sme, e-smith-backup-2_6_0-17_el7_sme, e-smith-backup-2_6_0-29_el7_sme, e-smith-backup-2_6_0-9_el7_sme, e-smith-backup-2_6_0-4_el7_sme, e-smith-backup-2_6_0-15_el7_sme, e-smith-backup-2_6_0-18_el7_sme, e-smith-backup-2_6_0-16_el7_sme, e-smith-backup-2_6_0-11_el7_sme, e-smith-backup-2_6_0-14_el7_sme, e-smith-backup-2_6_0-5_el7_sme, e-smith-backup-2_6_0-8_el7_sme, e-smith-backup-2_6_0-20_el7_sme, e-smith-backup-2_6_0-23_el7_sme, e-smith-backup-2_6_0-10_el7_sme, e-smith-backup-2_6_0-21_el7_sme, e-smith-backup-2_6_0-13_el7_sme, e-smith-backup-2_6_0-28_el7_sme, e-smith-backup-2_6_0-12_el7_sme, e-smith-backup-2_6_0-22_el7_sme, e-smith-backup-2_6_0-27_el7_sme, e-smith-backup-2_6_0-25_el7_sme, e-smith-backup-2_6_0-6_el7_sme, e-smith-backup-2_6_0-7_el7_sme, e-smith-backup-2_6_0-26_el7_sme, HEAD
* Sun Jul 31 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 2.6.0-4.sme
- Add or remove path in your backup by a file *.include and *.exclude
- Added e-smith-backup-2.6.0.Add_Or_Remove_Path_In_Backup.patch [SME: 9607]

1 diff -Nur e-smith-backup-2.4.0.bz9090.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/backup e-smith-backup-2.4.0.bz9090.new/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/backup
2 --- e-smith-backup-2.4.0.bz9090.old/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/backup 2015-10-11 21:55:16.705468622 +0200
3 +++ e-smith-backup-2.4.0.bz9090.new/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/backup 2015-10-29 22:56:34.807907323 +0100
4 @@ -928,5 +928,8 @@
5 <base>Mounted disk</base>
6 <trans>Mounted disk</trans>
7 </entry>
8 - </lexicon>
9 -
10 + <entry>
11 + <base>ERROR_WHEN_TESTING_REMOTE_SERVER</base>
12 + <trans>The parameters have been saved, however the remote host is not reachable, please check your settings.</trans>
13 + </entry>
14 +</lexicon>
15 diff -Nur e-smith-backup-2.4.0.bz9090.old/root/etc/e-smith/web/functions/backup e-smith-backup-2.4.0.bz9090.new/root/etc/e-smith/web/functions/backup
16 --- e-smith-backup-2.4.0.bz9090.old/root/etc/e-smith/web/functions/backup 2015-10-11 21:55:16.741473836 +0200
17 +++ e-smith-backup-2.4.0.bz9090.new/root/etc/e-smith/web/functions/backup 2015-10-15 23:47:28.040059646 +0200
18 @@ -1729,6 +1729,21 @@
19 system("/sbin/e-smith/signal-event", "conf-backup") == 0
20 or die($fm->localise('ERR_CONF_BACKUP'),"\n");
21
22 + # we test if the remote host is reachable, else we simply display a warning
23 + if ( $VFSType =~ m/cifs|nfs/s )
24 + {
25 + my $error_message = vmount($backupwkStation,$backupwkFolder,$backupwkMount,$VFSType);
26 + if (! $error_message)
27 + {
28 + bunmount($backupwkMount,$VFSType);
29 + }
30 + elsif ($error_message)
31 + {
32 + esmith::cgi::genResult($q, $fm->localise('ERROR_WHEN_TESTING_REMOTE_SERVER').$q->br() . "$error_message");
33 + return;
34 + }
35 + }
36 +
37 esmith::cgi::genResult(
38 $q, $fm->localise('SUCCESSFULLY_ENABLED_WORKSTN').$q->br().
39 $fm->localise('WITH_BACKUP_TIME')."$backupwkHour:$backupwkMin");
40 @@ -3217,6 +3232,23 @@
41 return;
42 }
43
44 +#Used to test if the remote share is mountable when you save settings in database
45 +sub vmount
46 +{
47 + # mount dar unit according to dar-workstation configuration in order to test the remote host
48 + # return nothing if mount successfull
49 + my ($host,$share,$mountdir,$VFSType) = @_;
50 + if ($VFSType eq 'cifs')
51 + {
52 + return ( qx(/bin/mount -t cifs "//$host/$share" $mountdir -o credentials=/etc/dar/CIFScredentials,nounix 2>&1) );
53 + }
54 + elsif ($VFSType eq 'nfs')
55 + {
56 + return ( qx(/bin/mount -t nfs -o nolock,timeo=30,retrans=1,retry=0 "$host:/$share" $mountdir 2>&1) );
57 + }
58 +
59 +}
60 +
61 __DATA__
62 <form>
63 </form>
64

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