[csw-devel] SF.net SVN: gar:[12022] csw/mgar/pkg/exim/branches/dir-loc-fixes
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Mon Dec 20 04:20:47 CET 2010
Revision: 12022
http://gar.svn.sourceforge.net/gar/?rev=12022&view=rev
Author: bdwalton
Date: 2010-12-20 03:20:47 +0000 (Mon, 20 Dec 2010)
Log Message:
-----------
exim/dir-loc-fixes: depend on rsync, use it during preinstall script to move spool and log files
Modified Paths:
--------------
csw/mgar/pkg/exim/branches/dir-loc-fixes/Makefile
Added Paths:
-----------
csw/mgar/pkg/exim/branches/dir-loc-fixes/files/CSWexim.preinstall
Modified: csw/mgar/pkg/exim/branches/dir-loc-fixes/Makefile
===================================================================
--- csw/mgar/pkg/exim/branches/dir-loc-fixes/Makefile 2010-12-19 17:36:37 UTC (rev 12021)
+++ csw/mgar/pkg/exim/branches/dir-loc-fixes/Makefile 2010-12-20 03:20:47 UTC (rev 12022)
@@ -17,6 +17,7 @@
MASTER_SITES = ftp://ftp.exim.org/pub/exim/exim4/
DISTFILES = $(NAME)-$(VERSION).tar.bz2
DISTFILES += CSWexim.postinstall CSWexim.postremove CSWexim.request
+DISTFILES += CSWexim.preinstall
# NOTE TO FUTURE MAINTAINERS:
# This patch should be thoroughly reviewed for each update so as not to
@@ -29,7 +30,7 @@
RUNTIME_DEP_PKGS_CSWexim = CSWiconv CSWoldaprt CSWosslrt CSWsasl
RUNTIME_DEP_PKGS_CSWexim += CSWmysql5rt CSWlibpq CSWlibspf2
RUNTIME_DEP_PKGS_CSWexim += CSWgzip CSWgzipextras
-RUNTIME_DEP_PKGS_CSWexim += CSWpcrert
+RUNTIME_DEP_PKGS_CSWexim += CSWpcrert CSWrsync
# We define upstream file regex so we can be notifed of new upstream software release
UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.bz2
Added: csw/mgar/pkg/exim/branches/dir-loc-fixes/files/CSWexim.preinstall
===================================================================
--- csw/mgar/pkg/exim/branches/dir-loc-fixes/files/CSWexim.preinstall (rev 0)
+++ csw/mgar/pkg/exim/branches/dir-loc-fixes/files/CSWexim.preinstall 2010-12-20 03:20:47 UTC (rev 12022)
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+PIR={$PKG_INSTALL_ROOT:-}
+SPOOLOLD=${PIR}/opt/csw/var/spool
+SPOOLNEW=${PIR}/var/opt/csw/spool
+LOGOLD=${PIR}/opt/csw/var/log
+LOGNEW=${PIR}/var/opt/csw/log
+RSYNC=${PIR}/opt/csw/bin/rsync
+
+if [ -x ${RSYNC} ]; then
+ if [ -d "${SPOOLOLD}/exim" -a ! -d "${SPOOLNEW}/exim" ]; then
+ echo "Transferring existing spool files to new location..."
+ $RSYNC -a --numeric-uids "${SPOOLOLD}/exim" "${SPOOLNEW}/"
+ else
+ echo "New spool directory exists already. Not touching anything."
+ fi
+
+ if [ -d "${LOGOLD}/exim" -a ! -d "${LOGNEW}/exim" ]; then
+ echo "Transferring existing log files to new location..."
+ $RSYNC -a --numeric-uids "${LOGOLD}/exim" "${LOGNEW}/"
+ else
+ echo "New log directory exists already. Not touching anything."
+ fi
+else
+ echo ""
+ echo ""
+ echo "********************************************************"
+ echo "No rsync binary available at ${RSYNC}."
+ echo "NOT MOVING your exim spool directory or log files!!!"
+ echo "********************************************************"
+ echo ""
+ echo ""
+fi
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