[CalendarServer-changes] [8480] CalendarServer/trunk/contrib/migration/calendarmigrator.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Jan 3 14:02:33 PST 2012


Revision: 8480
          http://trac.macosforge.org/projects/calendarserver/changeset/8480
Author:   sagen at apple.com
Date:     2012-01-03 14:02:19 -0800 (Tue, 03 Jan 2012)
Log Message:
-----------
Removing a launchctl call that should no longer be necessary.

Modified Paths:
--------------
    CalendarServer/trunk/contrib/migration/calendarmigrator.py

Modified: CalendarServer/trunk/contrib/migration/calendarmigrator.py
===================================================================
--- CalendarServer/trunk/contrib/migration/calendarmigrator.py	2012-01-03 21:02:21 UTC (rev 8479)
+++ CalendarServer/trunk/contrib/migration/calendarmigrator.py	2012-01-03 22:02:19 UTC (rev 8480)
@@ -45,7 +45,6 @@
 NEW_SERVER_ROOT = "/Library/Server/" + NEW_SERVER_DIR
 RESOURCE_MIGRATION_TRIGGER = "trigger_resource_migration"
 SERVER_ADMIN = "/usr/sbin/serveradmin"
-LAUNCHCTL = "/bin/launchctl"
 DITTO = "/usr/bin/ditto"
 
 
@@ -208,13 +207,7 @@
 
         if os.path.exists(options.sourceRoot):
 
-            # If calendar service was running on previous system
-            # turn it off while we process configuration.  There
-            # is no need to turn off addressbook because it no longer
-            # has its own launchd plist.
             enableCalDAV, enableCardDAV = examineRunState(options)
-            if enableCalDAV:
-                unloadService(options, CALDAV_LAUNCHD_KEY)
 
             # Pull values out of previous plists
             (
@@ -344,17 +337,6 @@
     log("serveradmin exited with %d" % (ret,))
 
 
-def unloadService(options, service):
-    """
-    Use launchctl to unload a service
-    """
-    path = os.path.join(options.targetRoot, LAUNCHD_PREFS_DIR,
-                        "%s.plist" % (service,))
-    log("Unloading %s via launchctl" % (path,))
-    ret = subprocess.call([LAUNCHCTL, "unload", "-w", path])
-    log("launchctl exited with %d" % (ret,))
-
-
 def triggerResourceMigration(newServerRootValue):
     """
     Leave a file in the server root to act as a signal that the server
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120103/410fca1a/attachment.html>


More information about the calendarserver-changes mailing list