2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-21 10:40:24 +00:00

Merge pull request #1693 from cxhong/selinux

genimage failed for rhels7.2 because /etc/selinux/config file is not exists
This commit is contained in:
Victor Hu
2016-08-12 16:29:31 -04:00
committed by GitHub
3 changed files with 12 additions and 4 deletions

View File

@@ -35,7 +35,10 @@ echo "co:2345:respawn:/sbin/agetty -L 38400 console" >> $installroot/etc/inittab
#-- Disable SELinux in the rootimg
#-- Redhat 7.3 will install selinux-policy and selinux is enabled by default
#-- Need to disable selinux, otherwise, the booting will hang on "Loading selinux policy"
sed -i 's/SELINUX=enforcing\|permissive/SELINUX=disabled/' $installroot/etc/selinux/config
if [ -f "$installroot/etc/selinux/config" ]
then
sed -i 's/SELINUX=enforcing\|permissive/SELINUX=disabled/' $installroot/etc/selinux/config
fi
#-- Example of booted image versioning
#-- We want to know, with what configuration (version of the image) each node was booted.

View File

@@ -35,8 +35,10 @@ END
#-- Disable SELinux in the rootimg
#-- Redhat 7.3 will install selinux-policy and selinux is enabled by default
#-- Need to disable selinux, otherwise, the booting will hang on "Loading selinux policy"
sed -i 's/SELINUX=enforcing\|permissive/SELINUX=disabled/' $installroot/etc/selinux/config
if [ -f "$installroot/etc/selinux/config" ]
then
sed -i 's/SELINUX=enforcing\|permissive/SELINUX=disabled/' $installroot/etc/selinux/config
fi
#-- Example of booted image versioning
#-- We want to know, with what configuration (version of the image) each node was booted.

View File

@@ -39,7 +39,10 @@ echo "co:2345:respawn:/sbin/agetty -L 38400 console" >> $installroot/etc/inittab
#-- Disable SELinux in the rootimg
#-- Redhat 7.3 will install selinux-policy and selinux is enabled by default
#-- Need to disable selinux, otherwise, the booting will hang on "Loading selinux policy"
sed -i 's/SELINUX=enforcing\|permissive/SELINUX=disabled/' $installroot/etc/selinux/config
if [ -f "$installroot/etc/selinux/config" ]
then
sed -i 's/SELINUX=enforcing\|permissive/SELINUX=disabled/' $installroot/etc/selinux/config
fi
#-- Example of booted image versioning
#-- We want to know, with what configuration (version of the image) each node was booted.