]> git.pld-linux.org Git - packages/Zope.git/commitdiff
- added migration scriptlet (untested)
authorsiefca <siefca@pld-linux.org>
Sun, 10 Aug 2003 17:29:44 +0000 (17:29 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    Zope.spec -> 1.34

Zope.spec

index 51eadcd70b246c9398a9285f012507201409749d..94b8d08c20619d9138f05c6ffe32c88c73cd4aed 100644 (file)
--- a/Zope.spec
+++ b/Zope.spec
@@ -147,7 +147,18 @@ fi
 
 %post
 /sbin/chkconfig --add zope
-if [ -f /var/lock/subsys/zope ]; then
+if [ -f /var/lib/zope/Data.fs ]; then
+       echo "Found the database in old location. Migrating..."
+       if [ -f /var/lock/subsys/zope ]; then
+           /etc/rc.d/init.d/zope stop >&2
+           was_stopped=1
+       fi
+       [ -d /var/lib/zope/main ] && cd /var/lib/zope && mv -r * ./main
+       if [ "x$was_stopped" = "x1" ]; then
+           /etc/rc.d/init.d/zope start
+       fi
+       echo "Migration completed (new db location is /var/lib/zope/main)"
+elif [ -f /var/lock/subsys/zope ]; then
        /etc/rc.d/init.d/zope restart >&2
 else
        echo "Create inituser using \"zpasswd inituser\" in directory \"/var/lib/zope/main\"" >&2
This page took 0.033947 seconds and 4 git commands to generate.