Created
February 1, 2016 21:24
-
-
Save metal3d/2d78efdd9c6ce573a2cd to your computer and use it in GitHub Desktop.
Patch to change SELinux context of CoreOS libvirt deployment script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -up ./deploy_coreos_libvirt.sh.friend ./deploy_coreos_libvirt.sh | |
diff -up ./deploy_coreos_libvirt.sh.friend ./deploy_coreos_libvirt.sh | |
--- ./deploy_coreos_libvirt.sh.friend 2016-01-25 14:18:15.431503583 +0100 | |
+++ ./deploy_coreos_libvirt.sh 2016-01-25 14:24:35.942741966 +0100 | |
@@ -51,6 +51,12 @@ for SEQ in $(seq 1 $1); do | |
sed "s#%HOSTNAME%#$COREOS_HOSTNAME#g;s#%DISCOVERY%#$ETCD_DISCOVERY#g" $USER_DATA_TEMPLATE > $LIBVIRT_PATH/$COREOS_HOSTNAME/openstack/latest/user_data | |
+ | |
+ if [[ selinuxenabled ]] ;then | |
+ echo "Making SELinux configuration" | |
+ semanage fcontext -a -t virt_content_t "$LIBVIRT_PATH/$COREOS_HOSTNAME(/.*)" | |
+ restorecon -R "$LIBVIRT_PATH" | |
+ fi | |
virt-install --connect qemu:///system \ | |
--import \ | |
--name $COREOS_HOSTNAME \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment