@@ -66,10 +66,7 @@ cp -a framework/files/* %{buildroot}
6666rm -rf %{buildroot }/var/log/journal
6767
6868# remove luet config in Elemental Teal
69- rm -rf %{buildroot }/etc/luet
70-
71- # belongs to elemental-system-agent package
72- rm %{buildroot }%{_unitdir }/elemental-system-agent.service
69+ rm -rf %{buildroot }/etc/luet
7370
7471# remove placeholders
7572rm -rf %{buildroot }/usr/libexec/.placeholder
@@ -82,6 +79,7 @@ rm -rf %{buildroot}/usr/libexec/.placeholder
8279%service_add_pre elemental-register-install.service
8380%service_add_pre elemental-register-reset.service
8481%service_add_pre elemental-register.timer
82+ %service_add_pre elemental-system-agent.service
8583%endif
8684
8785%post
@@ -92,13 +90,15 @@ rm -rf %{buildroot}/usr/libexec/.placeholder
9290%service_add_post elemental-register-install.service
9391%service_add_post elemental-register-reset.service
9492%service_add_post elemental-register.timer
93+ %service_add_post elemental-system-agent.service
9594%else
9695%systemd_post elemental-populate-node-labels.service
9796%systemd_post shutdown-containerd.service
9897%systemd_post elemental-register.service
9998%systemd_post elemental-register-install.service
10099%systemd_post elemental-register-reset.service
101100%systemd_post elemental-register.timer
101+ %systemd_post elemental-system-agent.service
102102%endif
103103
104104%preun
@@ -109,13 +109,15 @@ rm -rf %{buildroot}/usr/libexec/.placeholder
109109%service_del_preun elemental-register-install.service
110110%service_del_preun elemental-register-reset.service
111111%service_del_preun elemental-register.timer
112+ %service_del_preun elemental-system-agent.service
112113%else
113114%systemd_preun elemental-populate-node-labels.service
114115%systemd_preun shutdown-containerd.service
115116%systemd_preun elemental-register.service
116117%systemd_preun elemental-register-install.service
117118%systemd_preun elemental-register-reset.service
118119%systemd_preun elemental-register.timer
120+ %systemd_preun elemental-system-agent.service
119121%endif
120122
121123%postun
@@ -126,13 +128,15 @@ rm -rf %{buildroot}/usr/libexec/.placeholder
126128%service_del_postun elemental-register-install.service
127129%service_del_postun elemental-register-reset.service
128130%service_del_postun elemental-register.timer
131+ %service_del_postun elemental-system-agent.service
129132%else
130133%systemd_postun elemental-populate-node-labels.service
131134%systemd_postun shutdown-containerd.service
132135%systemd_postun elemental-register.service
133136%systemd_postun elemental-register-install.service
134137%systemd_postun elemental-register-reset.service
135138%systemd_postun elemental-register.timer
139+ %systemd_postun elemental-system-agent.service
136140%endif
137141
138142%files
@@ -154,6 +158,7 @@ rm -rf %{buildroot}/usr/libexec/.placeholder
154158%{_unitdir }/elemental-register-reset.service
155159%{_unitdir }/elemental-register.timer
156160%{_unitdir }/elemental-populate-node-labels.service
161+ %{_unitdir }/elemental-system-agent.service
157162%{_sbindir }/elemental-populate-node-labels
158163%dir /usr/libexec
159164%dir %{systemdir }
0 commit comments