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:
@@ -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.
|
||||
|
@@ -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.
|
||||
|
@@ -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.
|
||||
|
Reference in New Issue
Block a user