]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rpm: Restore /var/run/ceph context manually
authorBoris Ranto <branto@redhat.com>
Mon, 23 May 2016 15:06:19 +0000 (17:06 +0200)
committerBoris Ranto <branto@redhat.com>
Mon, 23 May 2016 19:59:14 +0000 (21:59 +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>
ceph.spec.in

index 34e3256e425ec4c9794b6bc7623df815fd685480..a622cb867e80aada4f4b424a55fa28ea10c306a5 100644 (file)
@@ -1452,6 +1452,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
@@ -1486,6 +1488,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