--- rpms/e-smith-ibays/sme9/e-smith-ibays-2.4.0_addtmpfolder_to_ibays.patch 2014/05/08 07:20:20 1.1 +++ rpms/e-smith-ibays/sme9/e-smith-ibays-2.4.0_addtmpfolder_to_ibays.patch 2015/01/03 23:08:30 1.2 @@ -1,11 +1,6 @@ -diff -Nur e-smith-ibays-2.4.0.old7011/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore e-smith-ibays-2.4.0/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore ---- e-smith-ibays-2.4.0.old7011/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore 1970-01-01 01:00:00.000000000 +0100 -+++ e-smith-ibays-2.4.0/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore 2014-05-04 14:46:42.497540282 +0200 -@@ -0,0 +1 @@ -+#added to create the /etc/e-smith/skel/ibay/tmp folder -diff -Nur e-smith-ibays-2.4.0.old/root/etc/e-smith/events/actions/ibay-modify e-smith-ibays-2.4.0/root/etc/e-smith/events/actions/ibay-modify ---- e-smith-ibays-2.4.0.old/root/etc/e-smith/events/actions/ibay-modify 2014-03-22 18:05:25.531733369 +0100 -+++ e-smith-ibays-2.4.0/root/etc/e-smith/events/actions/ibay-modify 2014-03-23 10:32:16.403155934 +0100 +diff -Nur e-smith-ibays-2.4.0/root/etc/e-smith/events/actions/ibay-modify e-smith-ibays-2.4.0.bz7011/root/etc/e-smith/events/actions/ibay-modify +--- e-smith-ibays-2.4.0/root/etc/e-smith/events/actions/ibay-modify 2013-01-31 22:31:37.000000000 +0100 ++++ e-smith-ibays-2.4.0.bz7011/root/etc/e-smith/events/actions/ibay-modify 2015-01-03 22:24:18.806618131 +0100 @@ -158,6 +158,10 @@ #-------------------------------------------------- # main directory is writeable only by root @@ -31,3 +26,39 @@ diff -Nur e-smith-ibays-2.4.0.old/root/e } } +diff -Nur e-smith-ibays-2.4.0/root/etc/e-smith/events/actions/init-ibays e-smith-ibays-2.4.0.bz7011/root/etc/e-smith/events/actions/init-ibays +--- e-smith-ibays-2.4.0/root/etc/e-smith/events/actions/init-ibays 2015-01-03 23:58:49.961908458 +0100 ++++ e-smith-ibays-2.4.0.bz7011/root/etc/e-smith/events/actions/init-ibays 2015-01-03 23:48:40.862552687 +0100 +@@ -59,5 +59,27 @@ + "/home/e-smith/files/ibays/Primary/html/index.htm"); + } + ++#we want to create the folder /tmp if enabled in all Ibays(enabled by default) ++#introduced by the bug [SME: 7011] ++my $accounts = esmith::AccountsDB->open_ro or warn "Could not open account database: $!"; ++my @ibays = $accounts->ibays; ++my $uid = '102'; #or www ++my $gid = '102'; #or www ++ ++foreach my $ibay (@ibays) ++{ ++ #Then we retrieve the name of the ebay ++ my $key = $ibay->key; ++ my $tmpdb = $ibay->prop('PHPTmpDir') || 'enabled'; ++ my $path = (('/home/e-smith/files/ibays/') . $key . '/tmp'); ++ ++ #we test the condition if /tmp exists or if it is disabled in the Ibay ++ if (!-d $path || $tmpdb eq "disabled") ++ { ++ mkdir $path, 0700 or warn "Could not create dir $path: $!"; ++ chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; ++ } ++} ++ + exit (0); + +diff -Nur e-smith-ibays-2.4.0/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore e-smith-ibays-2.4.0.bz7011/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore +--- e-smith-ibays-2.4.0/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore 1970-01-01 01:00:00.000000000 +0100 ++++ e-smith-ibays-2.4.0.bz7011/root/etc/e-smith/skel/ibay/tmp/.cvs_ignore 2015-01-03 23:58:20.889702229 +0100 +@@ -0,0 +1 @@ ++#added to create the /etc/e-smith/skel/ibay/tmp folder