From ca70bbb3fa353131d2e7a54f32b4c5d28607790b Mon Sep 17 00:00:00 2001 From: bin456789 Date: Fri, 29 Nov 2024 22:13:52 +0800 Subject: [PATCH] =?UTF-8?q?el:=20=E5=B0=86=20selinux=20=E5=BC=80=E5=85=B3?= =?UTF-8?q?=E5=86=99=E5=9C=A8=20cmdline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/trans.sh b/trans.sh index a382d59..2b71465 100644 --- a/trans.sh +++ b/trans.sh @@ -2964,16 +2964,14 @@ disable_selinux_kdump() { os_dir=$1 # selinux + # https://access.redhat.com/solutions/3176 + # centos7 也建议将 selinux 开关写在 cmdline + # grep selinux=0 /usr/lib/dracut/modules.d/98selinux/selinux-loadpolicy.sh + # warn "To disable selinux, add selinux=0 to the kernel command line." if [ -f $os_dir/etc/selinux/config ]; then sed -i 's/^SELINUX=enforcing/SELINUX=disabled/g' $os_dir/etc/selinux/config fi - - # https://access.redhat.com/solutions/3176 - # shellcheck disable=SC2154 - # openeuler 版本是 24.03 - if [ "$distro" = openeuler ] || [ "$releasever" -ge 9 ]; then - chroot $os_dir grubby --update-kernel ALL --args selinux=0 - fi + chroot $os_dir grubby --update-kernel ALL --args selinux=0 # kdump # grubby 只处理 GRUB_CMDLINE_LINUX,不会处理 GRUB_CMDLINE_LINUX_DEFAULT