]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk-activate: mark dir as upstart-managed
authorSage Weil <sage@inktank.com>
Fri, 14 Dec 2012 21:49:14 +0000 (13:49 -0800)
committerSage Weil <sage@inktank.com>
Fri, 14 Dec 2012 21:49:26 +0000 (13:49 -0800)
Mark the directory so that upstart will manage the daemon.  Eventually,
this should be generalized to allow ceph-disk-* usage with other init
systems.

Signed-off-by: Sage Weil <sage@inktank.com>
src/ceph-disk-activate

index 5fcc5bd177a5a501a4ec62b2911f9c9e601678bb..f78ae17ce889d744477e846c56dcc91c403ada6a 100755 (executable)
@@ -474,6 +474,11 @@ def activate(
                 keyring=keyring,
                 )
 
+        # indicate this daemon is managed by upstart
+        if not os.path.exists(os.path.join(path, 'upstart')):
+            with file(os.path.join(path, 'upstart'), 'w'):
+                pass
+
         if not os.path.exists(os.path.join(path, 'active')):
             log.debug('Authorizing OSD key...')
             auth_key(