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

Contents of /rpms/e-smith-backup/sme9/e-smith-backup-2.4.0-workstation-backup-wol.patch

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


Revision 1.1 - (show annotations) (download)
Fri Jul 5 23:24:49 2013 UTC (11 years, 4 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-backup-2_4_0-25_el6_sme, e-smith-backup-2_4_0-46_el6_sme, e-smith-backup-2_4_0-23_el6_sme, e-smith-backup-2_4_0-28_el6_sme, e-smith-backup-2_4_0-35_el6_sme, e-smith-backup-2_4_0-21_el6_sme, e-smith-backup-2_4_0-44_el6_sme, e-smith-backup-2_4_0-37_el6_sme, e-smith-backup-2_4_0-24_el6_sme, e-smith-backup-2_4_0-8_el6_sme, e-smith-backup-2_4_0-45_el6_sme, e-smith-backup-2_4_0-31_el6_sme, e-smith-backup-2_4_0-5_el6_sme, e-smith-backup-2_4_0-30_el6_sme, e-smith-backup-2_4_0-6_el6_sme, e-smith-backup-2_4_0-7_el6_sme, e-smith-backup-2_4_0-16_el6_sme, e-smith-backup-2_4_0-39_el6_sme, e-smith-backup-2_4_0-40_el6_sme, e-smith-backup-2_4_0-43_el6_sme, e-smith-backup-2_4_0-11_el6_sme, e-smith-backup-2_4_0-32_el6_sme, e-smith-backup-2_4_0-42_el6_sme, e-smith-backup-2_4_0-9_el6_sme, e-smith-backup-2_4_0-19_el6_sme, e-smith-backup-2_4_0-34_el6_sme, e-smith-backup-2_4_0-10_el6_sme, e-smith-backup-2_4_0-22_el6_sme, e-smith-backup-2_4_0-36_el6_sme, e-smith-backup-2_4_0-20_el6_sme, e-smith-backup-2_4_0-12_el6_sme, e-smith-backup-2_4_0-17_el6_sme, e-smith-backup-2_4_0-14_el6_sme, e-smith-backup-2_4_0-33_el6_sme, e-smith-backup-2_4_0-26_el6_sme, e-smith-backup-2_4_0-38_el6_sme, e-smith-backup-2_4_0-29_el6_sme, e-smith-backup-2_4_0-13_el6_sme, e-smith-backup-2_4_0-27_el6_sme, e-smith-backup-2_4_0-18_el6_sme, e-smith-backup-2_4_0-41_el6_sme, e-smith-backup-2_4_0-15_el6_sme, HEAD
Error occurred while calculating annotation data.
* Fri Jul 5 2013 Ian Wells <esmith@wellsi.com> 2.4.0-5.sme
- Use Wake on LAN before starting Backup with DAR, by Dave Liquorice [SME: 7743]

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