Skip to content

Commit 3aee0e5

Browse files
authored
Merge pull request #214 from champtar/bootupd-grub2-static-ordering
Bootupd grub2 static ordering
2 parents 7641d6c + 6fb5916 commit 3aee0e5

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

greenboot.spec

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ mkdir -p %{buildroot}%{_prefix}/lib/%{name}/check/required.d
6969
mkdir %{buildroot}%{_prefix}/lib/%{name}/check/wanted.d
7070
mkdir %{buildroot}%{_prefix}/lib/%{name}/green.d
7171
mkdir %{buildroot}%{_prefix}/lib/%{name}/red.d
72+
install -D -t %{buildroot}%{_prefix}/lib/bootupd/grub2-static/configs.d grub2/08_greenboot.cfg
7273
mkdir -p %{buildroot}%{_unitdir}
7374
mkdir -p %{buildroot}%{_unitdir}/greenboot-healthcheck.service.d
7475
mkdir -p %{buildroot}%{_tmpfilesdir}
@@ -81,7 +82,6 @@ install -DpZm 0644 usr/lib/tmpfiles.d/greenboot-status-motd.conf %{buildroot}%{_
8182
install -DpZm 0755 usr/lib/greenboot/check/required.d/* %{buildroot}%{_prefix}/lib/%{name}/check/required.d
8283
install -DpZm 0755 usr/lib/greenboot/check/wanted.d/* %{buildroot}%{_prefix}/lib/%{name}/check/wanted.d
8384
install -DpZm 0644 etc/greenboot/greenboot.conf %{buildroot}%{_sysconfdir}/%{name}/greenboot.conf
84-
install -DpZm 0644 etc/grub.d/greenboot.cfg %{buildroot}%{_sysconfdir}/grub.d/greenboot.cfg
8585

8686
%post
8787
%systemd_post greenboot-healthcheck.service
@@ -94,9 +94,6 @@ install -DpZm 0644 etc/grub.d/greenboot.cfg %{buildroot}%{_sysconfdir}/grub.d/gr
9494
%systemd_post greenboot-grub2-set-success.service
9595
%systemd_post greenboot-rpm-ostree-grub2-check-fallback.service
9696
%systemd_post redboot-auto-reboot.service
97-
if [ -d /usr/lib/bootupd/grub2-static/configs.d ]; then
98-
cp /etc/grub.d/greenboot.cfg /usr/lib/bootupd/grub2-static/configs.d
99-
fi
10097

10198
%post default-health-checks
10299
%systemd_post greenboot-loading-message.service
@@ -125,9 +122,6 @@ fi
125122
%systemd_postun greenboot-grub2-set-counter.service
126123
%systemd_postun greenboot-grub2-set-success.service
127124
%systemd_postun greenboot-rpm-ostree-grub2-check-fallback.service
128-
if [ -f /usr/lib/bootupd/grub2-static/configs.d/greenboot.cfg ]; then
129-
rm -f /usr/lib/bootupd/grub2-static/configs.d/greenboot.cfg
130-
fi
131125

132126
%postun default-health-checks
133127
%systemd_postun greenboot-loading-message.service
@@ -152,7 +146,7 @@ fi
152146
%dir %{_prefix}/lib/%{name}/red.d
153147
%{_exec_prefix}/lib/motd.d/boot-status
154148
%{_tmpfilesdir}/greenboot-status-motd.conf
155-
%{_sysconfdir}/grub.d/*.cfg
149+
%{_prefix}/lib/bootupd/grub2-static/configs.d/*.cfg
156150
%dir %{_libexecdir}/%{name}
157151
%{_libexecdir}/%{name}/%{name}
158152
%{_libexecdir}/%{name}/greenboot-grub2-set-success
File renamed without changes.

0 commit comments

Comments
 (0)