/[smeserver]/rpms/e-smith-ibays/sme10/e-smith-ibays-2.6.0-create_sess_folder_in_ibays.patch
ViewVC logotype

Contents of /rpms/e-smith-ibays/sme10/e-smith-ibays-2.6.0-create_sess_folder_in_ibays.patch

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


Revision 1.1 - (show annotations) (download)
Thu Jun 23 07:27:20 2016 UTC (7 years, 11 months ago) by unnilennium
Branch: MAIN
CVS Tags: e-smith-ibays-2_6_0-4_el7_sme, e-smith-ibays-2_6_0-3_el7_sme
* Thu Jun 23 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-3.sme
- create tmp folder in ibays  when needed [SME: 9105]
- create session folder in ibays when needed [SME: 9621]

1 diff -Nur e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/ibay-modify e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/ibay-modify
2 --- e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/ibay-modify 2016-06-23 02:57:56.838000000 -0400
3 +++ e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/ibay-modify 2016-06-23 03:18:20.693000000 -0400
4 @@ -163,6 +163,10 @@
5 $tmpdir = ('/home/e-smith/files/ibays/' . $ibay->key . '/tmp') if $tmpdir eq 'enabled';
6 mkdir $tmpdir unless (-d $tmpdir || $tmpdir eq "disabled");
7
8 +my $sessdir = $ibay->prop('PHPSessionDir') || 'enabled';
9 +$sessdir = ('/home/e-smith/files/ibays/' . $ibay->key . '/session') if $sessdir eq 'enabled';
10 +mkdir $sessdir unless (-d $sessdir || $sessdir eq "disabled");
11 +
12 chdir "/home/e-smith/files/ibays/$ibayName"
13 or ( $x = 255, warn "Could not chdir to /home/e-smith/files/ibays/$ibayName" );
14
15 @@ -238,6 +242,13 @@
16 system ('/bin/chown', '-R', 'www:www' , $tmpdirperm);
17 system ('/bin/chmod' ,'-R', '0700' , $tmpdirperm );
18 }
19 + ##chmod 0700 ; chown www:www if session folder exists
20 + my $sessdirperm = (('/home/e-smith/files/ibays/' . $ibay->key . '/session')||'');
21 + if ( -d $sessdirperm)
22 + {
23 + system ('/bin/chown', '-R', 'www:www' , $sessdirperm);
24 + system ('/bin/chmod' ,'-R', '0700' , $sessdirperm );
25 + }
26 }
27 }
28
29 diff -Nur e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/init-ibays e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/init-ibays
30 --- e-smith-ibays-2.6.0.old/root/etc/e-smith/events/actions/init-ibays 2016-06-23 02:57:56.838000000 -0400
31 +++ e-smith-ibays-2.6.0/root/etc/e-smith/events/actions/init-ibays 2016-06-23 03:21:50.502000000 -0400
32 @@ -72,6 +72,7 @@
33 #Then we retrieve the name of the ebay
34 my $key = $ibay->key;
35 my $tmpdb = $ibay->prop('PHPTmpDir') || 'enabled';
36 + my $sessiondb = $ibay->prop('PHPSessionDir') || 'enabled';
37 my $path = (('/home/e-smith/files/ibays/') . $key . '/tmp');
38
39 #we test the condition if /tmp exists or if it is disabled in the Ibay
40 @@ -79,6 +80,12 @@
41 {
42 mkdir $path, 0700 or warn "Could not create dir $path: $!";
43 chown $uid, $gid, $path or warn "Could not chown dir $path: $!";
44 + }
45 + #we test the condition if /session exists or if it is disabled in the Ibay
46 + unless (-d $path || $sessiondb eq "disabled")
47 + {
48 + mkdir $path, 0700 or warn "Could not create dir $path: $!";
49 + chown $uid, $gid, $path or warn "Could not chown dir $path: $!";
50 }
51 }
52
53 diff -Nur e-smith-ibays-2.6.0.old/root/etc/e-smith/skel/ibay/session/.cvs_ignore e-smith-ibays-2.6.0/root/etc/e-smith/skel/ibay/session/.cvs_ignore
54 --- e-smith-ibays-2.6.0.old/root/etc/e-smith/skel/ibay/session/.cvs_ignore 1969-12-31 19:00:00.000000000 -0500
55 +++ e-smith-ibays-2.6.0/root/etc/e-smith/skel/ibay/session/.cvs_ignore 2016-06-23 02:57:56.838000000 -0400
56 @@ -0,0 +1 @@
57 +#added to create the /etc/e-smith/skel/ibay/tmp folder

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