]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: change ownership of init file to ceph:ceph
authorShylesh Kumar <shmohan@redhat.com>
Thu, 7 Jul 2016 15:15:57 +0000 (20:45 +0530)
committerLoic Dachary <ldachary@redhat.com>
Wed, 26 Oct 2016 07:29:56 +0000 (09:29 +0200)
Fixes: http://tracker.ceph.com/issues/16280
Signed-off-by: Shylesh Kumar <shmohan@redhat.com>
(cherry picked from commit aab9d03e1b50ba10a383663088400b9fabe306cb)

src/ceph-disk/ceph_disk/main.py

index fdefe4f0d6e158676c92eda26bce98d623eed317..e94e791ed6be1c98b5ef3cf60c6d583371e1c91c 100755 (executable)
@@ -3261,8 +3261,9 @@ def activate(
                 init = init_get()
 
         LOG.debug('Marking with init system %s', init)
-        with file(os.path.join(path, init), 'w'):
-            pass
+        init_path = os.path.join(path, init)
+        with file(init_path, 'w'):
+            path_set_context(init_path)
 
     # remove markers for others, just in case.
     for other in INIT_SYSTEMS: