[csw-devel] SF.net SVN: gar:[12080] csw/mgar/pkg/exim/branches/dir-loc-fixes/files/ CSWexim.preinstall
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Fri Dec 24 15:43:25 CET 2010
Revision: 12080
http://gar.svn.sourceforge.net/gar/?rev=12080&view=rev
Author: bdwalton
Date: 2010-12-24 14:43:25 +0000 (Fri, 24 Dec 2010)
Log Message:
-----------
exim/branches/dir-loc-fixes: preinstall - create log and spool parent directories if required
Modified Paths:
--------------
csw/mgar/pkg/exim/branches/dir-loc-fixes/files/CSWexim.preinstall
Modified: csw/mgar/pkg/exim/branches/dir-loc-fixes/files/CSWexim.preinstall
===================================================================
--- csw/mgar/pkg/exim/branches/dir-loc-fixes/files/CSWexim.preinstall 2010-12-24 13:43:40 UTC (rev 12079)
+++ csw/mgar/pkg/exim/branches/dir-loc-fixes/files/CSWexim.preinstall 2010-12-24 14:43:25 UTC (rev 12080)
@@ -7,16 +7,24 @@
LOGNEW=${PIR}/var/opt/csw/log
COPY="cp -pR"
+# assume that if the new spool exists, that this is an upgrade of
+# exim from a version that already had the new filesystem layout...
if [ -d "${SPOOLOLD}/" -a ! -d "${SPOOLNEW}/exim" ]; then
echo "Transferring existing spool files to new location..."
- $COPY "${SPOOLOLD}" "${SPOOLNEW}"
+ if [ ! -d "${SPOOLNEW}" ]; then
+ mkdir -p "${SPOOLNEW}"
+ fi
+ $COPY "${SPOOLOLD}" "${SPOOLNEW}/"
else
echo "Looks like the new spool directory is in use already."
echo "Not touching anything."
fi
-if [ -d "${LOGOLD}" -a ! -f "${LOGNEW}/exim" ]; then
+if [ -d "${LOGOLD}" -a ! -d "${LOGNEW}/exim" ]; then
echo "Transferring existing log files to new location..."
+ if [ ! -d "${LOGNEW}" ]; then
+ mkdir -p "${LOGNEW}"
+ fi
$COPY "${LOGOLD}" "${LOGNEW}"
else
echo "Looks like the new log directory is in use already."
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list