/[smecontribs]/rpms/smeserver-affa/contribs7/smeserver-affa-0.9.0-bug4035.patch
ViewVC logotype

Contents of /rpms/smeserver-affa/contribs7/smeserver-affa-0.9.0-bug4035.patch

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


Revision 1.2 - (show annotations) (download)
Mon Mar 10 20:29:34 2008 UTC (16 years, 3 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Import on branch contribs7 of package smeserver-affa-0.10.0-0.el4.sme.src.rpm

1 --- smeserver-affa-0.9.0/root/sbin/e-smith/affa.bug4035 2008-03-10 16:55:18.000000000 +0100
2 +++ smeserver-affa-0.9.0/root/sbin/e-smith/affa 2008-03-10 17:23:24.000000000 +0100
3 @@ -120,6 +120,7 @@
4 my $cwd=getcwd;
5 chdir "/tmp";
6
7 +my $lockfile;
8 my $defaultEmail='admin';
9 my $rsyncLocal = '/usr/bin/rsync';
10 my $rsyncRemote = '/usr/bin/rsync';
11 @@ -372,7 +373,6 @@
12 lg( "Affa $VERSION: Starting job $jobname $Command ($job{'remoteHostName'})");
13 lg( "Description: ".$job{'Description'} ) if defined $job{'Description'};
14 lg( "Bandwidth limit: $job{'BandwidthLimit'} KBytes/sec") if $job{'BandwidthLimit'};
15 -my $lockfile = "$lockdir/$jobname";
16
17 # check if same job already running
18 $Command eq "scheduled" and getLock($lockfile)
19 @@ -662,6 +662,7 @@
20 {
21 dbg( " $k=$job{$k}" ) if $job{$k};
22 }
23 + $lockfile = "$lockdir/$jobname";
24 }
25
26 sub putDoneDates( $ )
27 @@ -1094,7 +1095,7 @@
28 my $WDName = "affa-watchdog-$jobname-$LocalIP";
29 my $trigger = Date::Format::time2str("%Y%m%d%H%M",time()+$nextScheduled);
30 open( WD, "</usr/lib/affa/watchdog.template" ) or warn "Error: Couldn't open /usr/lib/affa/watchdog.template\n";
31 - open( WDS, ">/usr/lib/affa/$WDName" ) or warn "Error: Couldn't open /usr/lib/affa/$WDName for writing\n";
32 + open( WDS, ">/tmp/$$.$WDName" ) or warn "Error: Couldn't open /tmp/$$.$WDName for writing\n";
33 dbg( "Watchdog parameters:" );
34 while( <WD> )
35 {
36 @@ -1114,10 +1115,11 @@
37 }
38 close( WDS );
39 close( WD );
40 - chmod( 0700, "/usr/lib/affa/$WDName" );
41 + chmod( 0700, "/tmp/$$.$WDName" );
42 my @cmd=('/usr/bin/ssh', '-o', "HostKeyAlias=$jobname", '-p', $job{'sshPort'}, $job{'remoteHostName'}, "/bin/rm", "-f", "/etc/cron.hourly/$WDName-reminder" );
43 not ExecCmd( @cmd, 0 ) or affaErrorExit( "Couldn't delete /etc/cron.hourly/$WDName-reminder on remote host." );
44 - remoteCopy("/usr/lib/affa/$WDName","/etc/cron.hourly/" );
45 + remoteCopy("/tmp/$$.$WDName","/etc/cron.hourly/$WDName" );
46 + unlink("/tmp/$$.$WDName");
47 }
48
49 sub updateReportDB()
50 @@ -1513,7 +1515,6 @@
51 sub isMounted($$)
52 {
53 (my $dev, my $AutomountPoint) = @_;
54 - $dev =~ s#^([^/]*):(.*)$#\/\/$1\/$2#; # 192.168.1.1://mypc/share -> //192.168.1.1///mypc/share
55 $AutomountPoint =~ s/\/$//;
56 my $df = new Filesys::DiskFree;
57 $df->df();
58 @@ -2466,6 +2467,7 @@
59 print "Job '$jobname' is running. Wait for completion. Then run affa --create-backup-file again.\n";
60 affaErrorExit( "affa job 'jobname' is running." );
61 }
62 + setLock();
63
64 # check if archive exists
65 checkArchiveExists($job{'RootDir'},$jobname,$archive);
66 --- smeserver-affa-0.9.0/root/usr/lib/affa/create-backup-file.sh.bug4035 2008-03-10 17:27:45.000000000 +0100
67 +++ smeserver-affa-0.9.0/root/usr/lib/affa/create-backup-file.sh 2008-03-10 17:28:17.000000000 +0100
68 @@ -30,7 +30,10 @@
69 verifyint()
70 {
71 echo "Verify terminated by user"
72 - rm -f $OUTFILE.md5sum $PIPE
73 + rm -f $PIPE
74 + if [ $OUTFILE.md5sum ] ; then
75 + cat $OUTFILE.md5sum | sed -e s/-/$BASENAME/ > $OUTFILE.md5sum
76 + fi
77 exit 0
78 }
79
80 --- smeserver-affa-0.9.0/root/usr/lib/affa/jobconfig-sample.pl.bug4035 2007-12-19 09:19:31.000000000 +0100
81 +++ smeserver-affa-0.9.0/root/usr/lib/affa/jobconfig-sample.pl 2008-03-10 16:55:18.000000000 +0100
82 @@ -40,6 +40,7 @@
83 'AutomountDevice'=>'', # Device to auto mount (e.g. USB drive)
84 'AutomountPoint'=>'', # the mountpoint for AutomountDevice
85 'AutomountOptions'=>'', # Optionstring passed to mount command e.g. '-t cifs'
86 + 'AutoUnmount'=>'yes', # umount if fs was not mounted before Affa ran
87 'RootDir'=>'/var/affa', # where to save the archives. Don't use /root or /home/e-smith
88 'Debug'=>'no', # yes | no
89 'status'=>'enabled', # enabled | disabled
90 --- smeserver-affa-0.9.0/root/usr/lib/affa/jobconfig-cygwin-sample.pl.bug4035 2008-01-17 18:20:38.000000000 +0100
91 +++ smeserver-affa-0.9.0/root/usr/lib/affa/jobconfig-cygwin-sample.pl 2008-03-10 16:55:18.000000000 +0100
92 @@ -37,6 +37,7 @@
93 'AutomountDevice'=>'', # Device to auto mount (e.g. USB drive)
94 'AutomountPoint'=>'', # the mountpoint for AutomountDevice
95 'AutomountOptions'=>'', # Optionstring passed to mount command e.g. '-t cifs'
96 + 'AutoUnmount'=>'yes', # umount if fs was not mounted before Affa ran
97 'RootDir'=>'/var/affa', # where to save the archives. Don't use /root or /home/e-smith
98 'Debug'=>'no', # yes | no
99 'rsync--modify-window'=>0, # integer >= 0, timestamp window

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