summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2004-10-19 17:55:24 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2004-10-19 17:55:24 +0000
commiteb73fc5e7728247eef66476307b5b5f5ab5300fd (patch)
tree737c59b0a90b586dc634befda465f7deb58746c3 /net-mail/vpopmail
parentStable on alpha. (diff)
downloadhistorical-eb73fc5e7728247eef66476307b5b5f5ab5300fd.tar.gz
historical-eb73fc5e7728247eef66476307b5b5f5ab5300fd.tar.bz2
historical-eb73fc5e7728247eef66476307b5b5f5ab5300fd.zip
fix bug #59362.
Diffstat (limited to 'net-mail/vpopmail')
-rw-r--r--net-mail/vpopmail/files/vpopmail-Maildir-dotmaildir-fix.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/net-mail/vpopmail/files/vpopmail-Maildir-dotmaildir-fix.sh b/net-mail/vpopmail/files/vpopmail-Maildir-dotmaildir-fix.sh
index bacb3faf22d1..fb289aba5a42 100644
--- a/net-mail/vpopmail/files/vpopmail-Maildir-dotmaildir-fix.sh
+++ b/net-mail/vpopmail/files/vpopmail-Maildir-dotmaildir-fix.sh
@@ -1,7 +1,15 @@
#!/bin/bash
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/vpopmail/files/vpopmail-Maildir-dotmaildir-fix.sh,v 1.2 2004/10/19 17:55:24 robbat2 Exp $
+# Written by Robin H. Johnson, robbat2@gentoo.org
+
OLDNAME='Maildir'
NEWNAME='.maildir'
SEARCHPATH=/var/vpopmail/domains/
+MINDEPTH=3
+# If you have a very large vpopmail deployment, you may need to increase MAXDEPTH.
+MAXDEPTH=6
if [ "${1}" == '--revert' ]; then
SEARCHNAME="${NEWNAME}"
@@ -12,10 +20,12 @@ else
fi
echo "Doing '${SEARCHNAME}' '${REPLACENAME}' changeover"
-for i in `find ${SEARCHPATH} -name "${SEARCHNAME}" -maxdepth 3 -mindepth 3 -type d`; do
- foundname=${i}
- todoname=${foundname/${SEARCHNAME}/${REPLACENAME}}
+echo find ${SEARCHPATH} -name "${SEARCHNAME}" -maxdepth $MAXDEPTH -mindepth $MINDEPTH -type d
+for i in `find ${SEARCHPATH} -name "${SEARCHNAME}" -maxdepth $MAXDEPTH -mindepth $MINDEPTH -type d`; do
+ foundname=${i/${SEARCHNAME}*}${SEARCHNAME}
base="`dirname $i`"
+ todoname=${base}/${REPLACENAME}
+ #echo "$foundname -> $todoname"
echo "Fixing `echo $base | sed -e "s|${SEARCHPATH}||g"`"
chmod +t $base
if [ -L ${todoname} ]; then