#!/bin/bash set -x set -e export PS4=+{$LINENO:${FUNCNAME[0]}} trap ‘echo "---NEWKERNARGS=$NEWKERNARGS xx=$xx------"‘ DEBUG NEWKERNARGS="" grubby --info=`/sbin/grubby --default-kernel` 2>/dev/null | grep -q crashkernel if [ $? -ne 0 ];then NEWKERNARGS="--kernel-args=\"crashkernel=auto\"" fi xx=123 grubby --info=`/sbin/grubby --default-kernel` 2>/dev/null | grep -q "nopti noibrs noibpb" if [ $? -ne 0 ];then NEWKERNARGS="--kernel-args=\"crashkernel=auto nopti noibrs noibpb\"" fi /sbin/new-kernel-pkg --package kernel%{?1:-%{1}} %{!?1:--make-default} --install %{KVERREL}%{?1:.%{1}}
原文地址:https://www.cnblogs.com/noxy/p/11066018.html
时间: 2024-11-05 19:34:07