Fix a minor selinux step through issue
[releng/builder.git] / vagrant / rackspace-convert-base / bootstrap.sh
index 7590f33c917abb1cb61b1ca9b09f1909ba50d046..8079d7bc85e06b390b37b72ea60026b7fdbae762 100644 (file)
@@ -4,6 +4,12 @@
 
 # Handle the occurance where SELINUX is actually disabled
 if [ `grep SELINUX=permissive /etc/selinux/config` ]; then
+    # make sure that the filesystem is properly labelled.
+    # it could be not fully labeled correctly if it was just switched
+    # from disabled, the autorelabel misses some things
+    # skip relabelling on /dev as it will generally throw errors
+    restorecon -R -e /dev /
+
     # enable enforcing mode from the very start
     setenforce enforcing