1
0
forked from rpms/kernel

Create /etc/sysconfig/kernel if it's absent

https://github.com/AlmaLinux/cloud-images/issues/154
This commit is contained in:
Andrew Lukoshko 2023-08-04 12:30:18 +02:00
parent ec924aa85d
commit 75f7cb2046

View File

@ -3059,6 +3059,10 @@ if [ `uname -i` == "x86_64" -o `uname -i` == "i386" ] &&\
[ -f /etc/sysconfig/kernel ]; then\ [ -f /etc/sysconfig/kernel ]; then\
/bin/sed -r -i -e 's/^DEFAULTKERNEL=%{-r*}$/DEFAULTKERNEL=kernel%{?-v:-%{-v*}}/' /etc/sysconfig/kernel || exit $?\ /bin/sed -r -i -e 's/^DEFAULTKERNEL=%{-r*}$/DEFAULTKERNEL=kernel%{?-v:-%{-v*}}/' /etc/sysconfig/kernel || exit $?\
fi}\ fi}\
if [ ! -f /etc/sysconfig/kernel ]; then\
echo DEFAULTKERNEL=kernel > /etc/sysconfig/kernel\
echo UPDATEDEFAULT=yes >> /etc/sysconfig/kernel\
fi\
mkdir -p %{_localstatedir}/lib/rpm-state/%{name}\ mkdir -p %{_localstatedir}/lib/rpm-state/%{name}\
touch %{_localstatedir}/lib/rpm-state/%{name}/installing_core_%{KVERREL}%{?-v:+%{-v*}}\ touch %{_localstatedir}/lib/rpm-state/%{name}/installing_core_%{KVERREL}%{?-v:+%{-v*}}\
%{nil} %{nil}