[Error] [ 5.786497] Run /sbin/init as init process SELinux: Could not open policy file <= /etc/selinux/targeted/policy/policy.32: No such file or directory
Signed-off-by: Wang Chenglong 18509160991@163.com --- container/osimage/openeuler/create-image | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/container/osimage/openeuler/create-image b/container/osimage/openeuler/create-image index 631bb14..e161b17 100755 --- a/container/osimage/openeuler/create-image +++ b/container/osimage/openeuler/create-image @@ -13,6 +13,17 @@ setup_rootfs() ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime rm -f /etc/machine-id /var/lib/dbus/machine-id systemd-machine-id-setup + + # disable selinux + echo "Disable selinux" + if [ -f /etc/selinux/config ]; then + sed -i -r 's/^.*SELINUX=enforcing.*$/SELINUX=disabled/g' "/etc/selinux/config" + else + cat > "/etc/selinux/config" <<-EOF + SELINUX=disabled + SELINUXTYPE=targeted + EOF + fi }
setup_login() {
Pls ignore this email.
On Wed, Jan 20, 2021 at 04:28:26PM +0800, Wang Chenglong wrote:
[Error] [ 5.786497] Run /sbin/init as init process SELinux: Could not open policy file <= /etc/selinux/targeted/policy/policy.32: No such file or directory
Signed-off-by: Wang Chenglong 18509160991@163.com
container/osimage/openeuler/create-image | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/container/osimage/openeuler/create-image b/container/osimage/openeuler/create-image index 631bb14..e161b17 100755 --- a/container/osimage/openeuler/create-image +++ b/container/osimage/openeuler/create-image @@ -13,6 +13,17 @@ setup_rootfs() ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime rm -f /etc/machine-id /var/lib/dbus/machine-id systemd-machine-id-setup
- # disable selinux
- echo "Disable selinux"
- if [ -f /etc/selinux/config ]; then
sed -i -r 's/^.*SELINUX=enforcing.*$/SELINUX=disabled/g' "/etc/selinux/config"
- else
cat > "/etc/selinux/config" <<-EOF
SELINUX=disabled
SELINUXTYPE=targeted
EOF
- fi
}
setup_login() {
2.23.0