27 |
} |
} |
28 |
|
|
29 |
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 |
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 |
30 |
--- 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/root/etc/e-smith/events/actions/init-ibays 2015-01-04 15:42:23.594891869 +0100 |
31 |
+++ e-smith-ibays-2.4.0.bz7011/root/etc/e-smith/events/actions/init-ibays 2015-01-03 23:48:40.862552687 +0100 |
+++ e-smith-ibays-2.4.0.bz7011/root/etc/e-smith/events/actions/init-ibays 2015-01-04 15:43:54.275788309 +0100 |
32 |
@@ -59,5 +59,27 @@ |
@@ -25,6 +25,7 @@ |
33 |
|
use strict; |
34 |
|
use Errno; |
35 |
|
use esmith::util; |
36 |
|
+use esmith::AccountsDB; |
37 |
|
|
38 |
|
# Populate pre-defined Primary i-bay |
39 |
|
# Start with top level owner/permissions |
40 |
|
@@ -59,5 +60,27 @@ |
41 |
"/home/e-smith/files/ibays/Primary/html/index.htm"); |
"/home/e-smith/files/ibays/Primary/html/index.htm"); |
42 |
} |
} |
43 |
|
|
44 |
+#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) |
45 |
+#introduced by the bug [SME: 7011] |
+#introduced by the bug [SME: 7011] |
46 |
+my $accounts = esmith::AccountsDB->open_ro or warn "Could not open account database: $!"; |
+my $accounts = esmith::AccountsDB->open_ro or warn "Could not open account database: $!"; |
47 |
+my @ibays = $accounts->ibays; |
+my @ibays = $accounts->ibays; |
56 |
+ my $path = (('/home/e-smith/files/ibays/') . $key . '/tmp'); |
+ my $path = (('/home/e-smith/files/ibays/') . $key . '/tmp'); |
57 |
+ |
+ |
58 |
+ #we test the condition if /tmp exists or if it is disabled in the Ibay |
+ #we test the condition if /tmp exists or if it is disabled in the Ibay |
59 |
+ if (!-d $path || $tmpdb eq "disabled") |
+ unless (-d $path || $tmpdb eq "disabled") |
60 |
+ { |
+ { |
61 |
+ mkdir $path, 0700 or warn "Could not create dir $path: $!"; |
+ mkdir $path, 0700 or warn "Could not create dir $path: $!"; |
62 |
+ chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; |
+ chown $uid, $gid, $path or warn "Could not chown dir $path: $!"; |