--- rpms/e-smith-ibays/sme9/e-smith-ibays-2.4.0_addtmpfolder_to_ibays.patch 2015/01/03 23:08:30 1.2 +++ rpms/e-smith-ibays/sme9/e-smith-ibays-2.4.0_addtmpfolder_to_ibays.patch 2015/01/04 15:23:19 1.3 @@ -27,13 +27,21 @@ diff -Nur e-smith-ibays-2.4.0/root/etc/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 @@ +--- e-smith-ibays-2.4.0/root/etc/e-smith/events/actions/init-ibays 2015-01-04 15:42:23.594891869 +0100 ++++ e-smith-ibays-2.4.0.bz7011/root/etc/e-smith/events/actions/init-ibays 2015-01-04 15:43:54.275788309 +0100 +@@ -25,6 +25,7 @@ + use strict; + use Errno; + use esmith::util; ++use esmith::AccountsDB; + + # Populate pre-defined Primary i-bay + # Start with top level owner/permissions +@@ -59,5 +60,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) ++#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; @@ -48,7 +56,7 @@ diff -Nur e-smith-ibays-2.4.0/root/etc/e + 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") ++ unless (-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: $!";