/[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.2 - (show annotations) (download)
Sun Jun 26 16:30:04 2016 UTC (8 years, 4 months ago) by unnilennium
Branch: MAIN
CVS Tags: e-smith-ibays-2_6_0-5_el7_sme
Changes since 1.1: +4 -9 lines
* Sun Jun 26 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-5.sme
- as discussed, moving cache and tmp out of ibay folder [SME: 9105] [SME: 9621]
- creating basedir /var/cache/e-smith/files/ibays for tmp and cache

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 = ('/var/cache/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 = ('/var/cache/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 = (('/var/cache/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 = (('/var/cache/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

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