Fix /etc/hosts SELinux file context
/etc/hosts is modified and ends up having the wrong SELinux file context. Run restorecon to correct it. Change-Id: I07da602db49b0f122a86a95b5dc5d294fc95ce5c Closes-Bug: 1344417
This commit is contained in:
parent
c7d5246a75
commit
a7b223aaa2
|
@ -17,3 +17,8 @@ echo >> /var/run/hosts.d/new-hosts
|
|||
cat /var/run/hosts.d/tail >> /var/run/hosts.d/new-hosts
|
||||
echo >> /var/run/hosts.d/new-hosts
|
||||
mv /var/run/hosts.d/new-hosts /etc/hosts
|
||||
|
||||
# /etc/hosts may have the wrong SELinux file contexts.
|
||||
if [ -x /usr/sbin/semanage ]; then
|
||||
restorecon -v /etc/hosts
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue