55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
%update_bootloader_requires %{nil}
|
|
|
|
%update_bootloader_refresh_post() \
|
|
mkdir -p %{_rundir}/update-bootloader/ \
|
|
touch %{_rundir}/update-bootloader/refresh \
|
|
%nil
|
|
|
|
%update_bootloader_reinit_post() \
|
|
mkdir -p %{_rundir}/update-bootloader/ \
|
|
touch %{_rundir}/update-bootloader/reinit \
|
|
%nil
|
|
|
|
%update_bootloader_check_type_refresh_post() \
|
|
loader_type=`sed -n \\\
|
|
"/^[^#]*LOADER_TYPE=/{s@.*=\\(.*\\)@\\1@;s@^[\\"']@@;s@[\\"']\\\\$@@;p;q}" \\\
|
|
%{_sysconfdir}/sysconfig/bootloader \\\
|
|
2>/dev/null || :` \
|
|
for bl in %{?*}; do \
|
|
if test "x${bl}" = "x$loader_type" ; then \
|
|
mkdir -p %{_rundir}/update-bootloader/ \
|
|
touch %{_rundir}/update-bootloader/refresh \
|
|
break \
|
|
fi \
|
|
done \
|
|
%nil
|
|
|
|
%update_bootloader_check_type_reinit_post() \
|
|
loader_type=`sed -n \\\
|
|
"/^[^#]*LOADER_TYPE=/{s@.*=\\(.*\\)@\\1@;s@^[\\"']@@;s@[\\"']\\\\$@@;p;q}" \\\
|
|
%{_sysconfdir}/sysconfig/bootloader \\\
|
|
2>/dev/null || :` \
|
|
for bl in %{?*}; do \
|
|
if test "x${bl}" = "x$loader_type" ; then \
|
|
mkdir -p %{_rundir}/update-bootloader/ \
|
|
touch %{_rundir}/update-bootloader/reinit \
|
|
break \
|
|
fi \
|
|
done \
|
|
%nil
|
|
|
|
%update_bootloader_posttrans \
|
|
if test -x /sbin/update-bootloader; then \
|
|
if test -f %{_rundir}/update-bootloader/reinit; then \
|
|
rm -f -- %{_rundir}/update-bootloader/reinit %{_rundir}/update-bootloader/refresh \
|
|
if test -x %{_libexecdir}/grub2-instdev-fixup.pl; then \
|
|
%{_libexecdir}/grub2-instdev-fixup.pl || : \
|
|
fi \
|
|
/sbin/update-bootloader --reinit || : \
|
|
elif test -f %{_rundir}/update-bootloader/refresh; then \
|
|
rm -f %{_rundir}/update-bootloader/refresh \
|
|
/sbin/update-bootloader --refresh || : \
|
|
fi \
|
|
fi \
|
|
%nil
|