/[smeserver]/rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-workstation-backup-wol.patch
ViewVC logotype

Contents of /rpms/e-smith-backup/sme8/e-smith-backup-2.2.0-workstation-backup-wol.patch

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


Revision 1.1 - (show annotations) (download)
Wed Jul 3 00:32:15 2013 UTC (10 years, 10 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-backup-2_2_0-72_el5_sme, e-smith-backup-2_2_0-66_el5_sme, e-smith-backup-2_2_0-65_el5_sme, e-smith-backup-2_2_0-80_el5_sme, e-smith-backup-2_2_0-83_el5_sme, e-smith-backup-2_2_0-82_el5_sme, e-smith-backup-2_2_0-88_el5_sme, e-smith-backup-2_2_0-74_el5_sme, e-smith-backup-2_2_0-84_el5_sme, e-smith-backup-2_2_0-63_el5_sme, e-smith-backup-2_2_0-87_el5_sme, e-smith-backup-2_2_0-64_el5_sme, e-smith-backup-2_2_0-81_el5_sme, e-smith-backup-2_2_0-68_el5_sme, e-smith-backup-2_2_0-86_el5_sme, e-smith-backup-2_2_0-71_el5_sme, e-smith-backup-2_2_0-78_el5_sme, e-smith-backup-2_2_0-73_el5_sme, e-smith-backup-2_2_0-79_el5_sme, e-smith-backup-2_2_0-75_el5_sme, e-smith-backup-2_2_0-76_el5_sme, e-smith-backup-2_2_0-67_el5_sme, e-smith-backup-2_2_0-70_el5_sme, e-smith-backup-2_2_0-77_el5_sme, e-smith-backup-2_2_0-85_el5_sme, e-smith-backup-2_2_0-69_el5_sme, HEAD
* Tue Jul 02 2013 Ian Wells <esmith@wellsi.com> 2.2.0-63.sme
- Use Wake on LAN before starting Backup with DAR, by Dave Liquorice [SME: 4578]

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 --- e-smith-backup-2.2.0.old/root/etc/e-smith/events/actions/workstation-backup-dar 2013-05-09 04:02:49.000000000 +0100
3 +++ e-smith-backup-2.2.0/root/etc/e-smith/events/actions/workstation-backup-dar 2013-07-02 12:59:24.000000000 +0100
4 @@ -40,6 +40,7 @@
5
6 my $confdb = esmith::ConfigDB->open;
7 my $backupwk = $confdb->get('backupwk') or die "No backupwk db entry found\n";
8 +my $internalinterface = $confdb->get('InternalInterface') or die "No internalinterface db entry found\n";
9
10 my $tm = localtime(time);
11 my $bkname = $tm->year+1900;
12 @@ -66,6 +67,8 @@
13
14 my $smbhost = $backupwk->prop('SmbHost');
15 my $smbshare = $backupwk->prop('SmbShare');
16 +my $smbhostmac = $backupwk->prop('SmbHostMAC');
17 +my $smbhostdelay = $backupwk->prop('SmbHostDelay') || 300;
18 my $login = $backupwk->prop('Login');
19 my $password = $backupwk->prop('Password');
20 my $setsmax = $backupwk->prop('SetsMax') || 1;
21 @@ -80,6 +83,7 @@
22 my $mntdir = $backupwk->prop('Mount') || '/mnt/smb';
23 my $frommail = $backupwk->prop('FromMail') || 'admin-backup';
24 my $tomail = $backupwk->prop('ToMail') || 'admin';
25 +my $ether = $internalinterface->prop('Name');
26 my $tmpdir;
27
28 $report .= "From: ".$frommail."\n";
29 @@ -95,6 +99,15 @@
30
31 $report .= "Mounting backup shared directory $smbhost/$smbshare \n";
32
33 +# ping the SMB Host to see if it is awake
34 +
35 +if (defined($smbhostmac) && (system("ping -c1 $smbhost > /dev/null") != 0)) {
36 + $report .= "$smbhost might be asleep, attempting to wake\n";
37 + system("ether-wake -i $ether $smbhostmac");
38 + $report .= "Waiting $smbhostdelay seconds...\n";
39 + sleep $smbhostdelay;
40 +}
41 +
42 # verify backup directory not already mounted
43
44 open FD, '/proc/mounts';

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