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

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

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


Revision 1.1 - (hide annotations) (download)
Wed Feb 5 23:41:24 2014 UTC (10 years, 8 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-28_el6_sme, e-smith-backup-2_4_0-35_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-45_el6_sme, e-smith-backup-2_4_0-31_el6_sme, e-smith-backup-2_4_0-30_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-32_el6_sme, e-smith-backup-2_4_0-42_el6_sme, e-smith-backup-2_4_0-34_el6_sme, e-smith-backup-2_4_0-36_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-27_el6_sme, e-smith-backup-2_4_0-41_el6_sme, HEAD
* Wed Feb 5 2014 Ian Wells <esmith@wellsi.com> 2.4.0-25.sme
- Workstation Backup, backupname includes seconds. [SME: 8194]
- Simplification of the time routines.

1 wellsi 1.1 diff -ruN e-smith-backup-2.4.0.old/root/etc/e-smith/events/actions/workstation-backup-dar e-smith-backup-2.4.0/root/etc/e-smith/events/actions/workstation-backup-dar
2     --- e-smith-backup-2.4.0.old/root/etc/e-smith/events/actions/workstation-backup-dar 2014-02-05 15:14:23.000000000 -0800
3     +++ e-smith-backup-2.4.0/root/etc/e-smith/events/actions/workstation-backup-dar 2014-02-05 15:26:19.000000000 -0800
4     @@ -24,11 +24,10 @@
5     use Errno;
6     use esmith::util;
7     use esmith::templates;
8     -use Time::localtime;
9     use File::Copy;
10     use File::Path qw(make_path remove_tree);
11     use File::Find;
12     -use POSIX ":sys_wait_h";
13     +use POSIX qw(:sys_wait_h strftime);
14     use File::Glob qw(bsd_glob);
15     use esmith::ConfigDB;
16    
17     @@ -43,27 +42,14 @@
18     my $backupwk = $confdb->get('backupwk') or die "No backupwk db entry found\n";
19     my $internalinterface = $confdb->get('InternalInterface') or die "No internalinterface db entry found\n";
20    
21     -my $tm = localtime(time);
22     -my $bkname = $tm->year+1900;
23     +my $bkname = strftime '%Y%m%d%H%M%S', localtime;
24     +my $dow = strftime '%w', localtime;
25    
26     -$bkname .= "0" if ($tm->mon < 9);
27     -$bkname .= $tm->mon + 1;
28     -
29     -$bkname .= "0" if ($tm->mday < 10);
30     -$bkname .= $tm->mday;
31     -
32     -$bkname .= "0" if ($tm->hour < 10);
33     -$bkname .= $tm->hour;
34     -
35     -$bkname .= "0" if ($tm->min < 10);
36     -$bkname .= $tm->min;
37     -
38     -my $dow = $tm->wday;
39     my $id = $backupwk->prop('Id') ||
40     $confdb->get('SystemName')->value . "." . $confdb->get('DomainName')->value;
41     my $err;
42     my $ref = "";
43     -my $tim = ctime();
44     +
45    
46     my $smbhost = $backupwk->prop('SmbHost');
47     my $smbshare = $backupwk->prop('SmbShare');
48     @@ -93,7 +79,7 @@
49     $report .= "================================== \n";
50     $report .= "DAILY BACKUP TO WORKSTATION REPORT \n";
51     $report .= "================================== \n";
52     -$report .= "Backup of ".$id." started at " .$tim . "\n";
53     +$report .= "Backup of ".$id." started at " .localtime() . "\n";
54    
55     # ping the SMB Host to see if it is awake
56    
57     @@ -259,8 +245,7 @@
58     $backupwk->set_prop('SetNum', $setnum);
59     $backupwk->set_prop('IncNum', $incnum);
60    
61     -$tim = ctime();
62     -$report .= "Backup successfully terminated at $tim \n";
63     +$report .= "Backup successfully terminated at ".localtime()."\n";
64    
65     if ($mail eq 'yes')
66     {

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