]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rpm: Restore /var/run/ceph context manually 8938/head
authorBoris Ranto <branto@redhat.com>
Mon, 23 May 2016 15:06:19 +0000 (17:06 +0200)
committerNathan Cutler <ncutler@suse.com>
Tue, 24 May 2016 09:25:13 +0000 (11:25 +0200)
The fixfiles command won't fix label for /var/run/ceph (/run is probably
excluded from relabel), we need to restore the context manually.

Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit 6de39ce73737f79d4511dfc4e1d10d7f3733ab1b)

ceph.spec.in

index d8d45e793da775efd88d63d39b48a2186fffba7d..37669d411d7eee601ccbb9a511cdb9d3c3aa59a9 100644 (file)
@@ -1441,6 +1441,8 @@ fi
 # Now, relabel the files
 /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
 rm -f ${FILE_CONTEXT}.pre
+# The fixfiles command won't fix label for /var/run/ceph
+/usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
 
 # Start the daemons iff they were running before
 if test $STATUS -eq 0; then
@@ -1475,6 +1477,8 @@ if [ $1 -eq 0 ]; then
 
     /usr/sbin/fixfiles -C ${FILE_CONTEXT}.pre restore 2> /dev/null
     rm -f ${FILE_CONTEXT}.pre
+    # The fixfiles command won't fix label for /var/run/ceph
+    /usr/sbin/restorecon -R /var/run/ceph > /dev/null 2>&1
 
     # Start the daemons if they were running before
     if test $STATUS -eq 0; then