2001-04-06 22:57:14 +02:00
|
|
|
Index: tools/mkimap
|
|
|
|
diff -u tools/mkimap.orig tools/mkimap
|
2005-12-12 02:22:54 +01:00
|
|
|
--- tools/mkimap.orig Fri Dec 2 07:30:22 2005
|
|
|
|
+++ tools/mkimap Sat Dec 10 14:08:11 2005
|
|
|
|
@@ -90,6 +90,9 @@
|
2003-03-29 15:57:01 +01:00
|
|
|
|
|
|
|
$imapdconf = shift || "/etc/imapd.conf";
|
2001-04-06 22:57:14 +02:00
|
|
|
|
2003-01-30 15:04:02 +01:00
|
|
|
+$cyrus_user = $ENV{CYRUS_USER} || "%%CYRUS_USER%%";
|
|
|
|
+$cyrus_group = $ENV{CYRUS_GROUP} || "%%CYRUS_GROUP%%";
|
|
|
|
+
|
2005-12-12 02:22:54 +01:00
|
|
|
push @configs, $imapdconf;
|
|
|
|
|
|
|
|
while ($conf = shift @configs) {
|
|
|
|
@@ -100,6 +103,7 @@
|
2003-03-29 15:57:01 +01:00
|
|
|
|
|
|
|
print "configuring $d...\n";
|
|
|
|
|
|
|
|
+mkdir $d, 0755;
|
|
|
|
chdir $d or die "couldn't change to $d";
|
|
|
|
|
2004-07-26 22:39:54 +02:00
|
|
|
mkdir "proc", 0755 || warn "can't create $d/proc: $!";
|
2005-12-12 02:22:54 +01:00
|
|
|
@@ -110,12 +114,15 @@
|
2004-07-26 22:39:54 +02:00
|
|
|
mkdir "ptclient", 0755 || warn "can't create $d/ptclient: $!";
|
2005-12-12 02:22:54 +01:00
|
|
|
mkdir "sync", 0755 || warn "can't create $d/sync: $!";
|
2003-01-30 15:04:02 +01:00
|
|
|
|
|
|
|
+system "/usr/sbin/chown -R $cyrus_user:$cyrus_group .";
|
2001-04-06 22:57:14 +02:00
|
|
|
+
|
2003-03-29 15:57:01 +01:00
|
|
|
while ($part = shift @parts) {
|
|
|
|
print "creating $part...\n";
|
2004-07-26 22:39:54 +02:00
|
|
|
mkdir $part, 0755 || warn "can't create $part: $!";
|
2001-04-06 22:57:14 +02:00
|
|
|
chdir $part or die "couldn't change to partition $part";
|
2004-07-26 22:39:54 +02:00
|
|
|
mkdir "stage.", 0755 || warn "can't create $part/stage.: $!";
|
2005-12-12 02:22:54 +01:00
|
|
|
mkdir "sync.", 0755 || warn "can't create $part/sync.: $!";
|
2003-01-30 15:04:02 +01:00
|
|
|
+ system "/usr/sbin/chown -R $cyrus_user:$cyrus_group $part";
|
2001-04-06 22:57:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
print "done\n";
|