2001-04-06 22:57:14 +02:00
|
|
|
Index: tools/mkimap
|
|
|
|
diff -u tools/mkimap.orig tools/mkimap
|
2004-07-26 22:39:54 +02:00
|
|
|
--- tools/mkimap.orig Wed Jun 30 03:16:54 2004
|
|
|
|
+++ tools/mkimap Tue Jul 27 04:47:43 2004
|
2003-03-29 15:57:01 +01:00
|
|
|
@@ -61,6 +61,9 @@
|
|
|
|
|
|
|
|
$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%%";
|
|
|
|
+
|
|
|
|
open CONF, $imapdconf or die "can't open $imapdconf";
|
|
|
|
print "reading configure file...\n";
|
|
|
|
while (<CONF>) {
|
2003-03-29 15:57:01 +01:00
|
|
|
@@ -86,6 +89,7 @@
|
|
|
|
|
|
|
|
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: $!";
|
2003-03-29 15:57:01 +01:00
|
|
|
@@ -95,11 +99,14 @@
|
2004-07-26 22:39:54 +02:00
|
|
|
mkdir "msg", 0755 || warn "can't create $d/msg: $!";
|
|
|
|
mkdir "ptclient", 0755 || warn "can't create $d/ptclient: $!";
|
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.: $!";
|
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";
|