Skip to content

Commit

Permalink
Move grub cfg when bootup dir is present
Browse files Browse the repository at this point in the history
Signed-off-by: saypaul <paul.sayan@gmail.com>
  • Loading branch information
say-paul committed Sep 6, 2024
1 parent 05bfe80 commit dcbfa12
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions greenboot.spec
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ mkdir -p %{buildroot}%{_prefix}/lib/%{name}/check/required.d
mkdir %{buildroot}%{_prefix}/lib/%{name}/check/wanted.d
mkdir %{buildroot}%{_prefix}/lib/%{name}/green.d
mkdir %{buildroot}%{_prefix}/lib/%{name}/red.d
install -D -t %{buildroot}%{_prefix}/%{_sysconfdir}/grub.d grub2/greenboot.cfg
install -DpZm 0644 grub2/greenboot.cfg %{buildroot}%{_sysconfdir}/grub.d/greenboot.cfg
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_unitdir}/greenboot-healthcheck.service.d
mkdir -p %{buildroot}%{_tmpfilesdir}
Expand All @@ -90,6 +90,9 @@ install -DpZm 0644 etc/greenboot/greenboot.conf %{buildroot}%{_sysconfdir}/%{nam
%systemd_post greenboot-grub2-set-success.service
%systemd_post greenboot-rpm-ostree-grub2-check-fallback.service
%systemd_post redboot-auto-reboot.service
if [ -d /usr/lib/bootupd/grub2-static/configs.d ]; then
mv /etc/grub.d/greenboot.cfg /usr/lib/bootupd/grub2-static/configs.d
fi

%post default-health-checks
%systemd_post greenboot-loading-message.service
Expand Down Expand Up @@ -142,7 +145,7 @@ install -DpZm 0644 etc/greenboot/greenboot.conf %{buildroot}%{_sysconfdir}/%{nam
%dir %{_prefix}/lib/%{name}/red.d
%{_exec_prefix}/lib/motd.d/boot-status
%{_tmpfilesdir}/greenboot-status-motd.conf
%{_prefix}/etc/grub.d/*.cfg
%{_sysconfdir}/grub.d/*.cfg
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/%{name}
%{_libexecdir}/%{name}/greenboot-grub2-set-success
Expand Down

0 comments on commit dcbfa12

Please sign in to comment.