Relabel /tftpboot if selinux is used

nova-baremetal install creates this directory. We call restorecon
on /tftpboot so that it gets the correct label of tftpdir_t.

It it is not relabeled, baremetal instances will fail to boot
because images cannot be read if selinux is in enforcing mode.

Change-Id: Id03a68a10c4379c7ba5546508dde1b874260b2d1
This commit is contained in:
Richard Su 2014-04-02 22:48:53 -07:00
parent 8dada7907d
commit 30067c7ded

View File

@ -0,0 +1,8 @@
#!/bin/bash
set -eux
[ -x /usr/sbin/restorecon ] || exit 0
# /tftpboot is created in 80-nova-baremetal.
# Here we are ensuring it is labeled correctly.
restorecon -R /tftpboot