@@ -290,7 +290,7 @@ cp client/target/lib/*jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/lib/
290290rm -rf ${RPM_BUILD_ROOT}%{_datadir }/%{name }-management/webapps/client/WEB-INF/classes/scripts
291291rm -rf ${RPM_BUILD_ROOT}%{_datadir }/%{name }-management/webapps/client/WEB-INF/classes/vms
292292
293- for name in db.properties server.properties log4j-cloud.xml environment.properties java.security.ciphers
293+ for name in db.properties server.properties log4j-cloud.xml uefi.properties environment.properties java.security.ciphers
294294do
295295 cp client/target/conf/$name ${RPM_BUILD_ROOT}%{_sysconfdir }/%{name }/management/$name
296296done
@@ -358,6 +358,7 @@ install -D packaging/systemd/cloudstack-agent.service ${RPM_BUILD_ROOT}%{_unitdi
358358install -D packaging/systemd/cloudstack-rolling-maintenance@.service ${RPM_BUILD_ROOT}%{_unitdir }/%{name }-rolling-maintenance@.service
359359install -D packaging/systemd/cloudstack-agent.default ${RPM_BUILD_ROOT}%{_sysconfdir }/default/%{name }-agent
360360install -D agent/target/transformed/agent.properties ${RPM_BUILD_ROOT}%{_sysconfdir }/%{name }/agent/agent.properties
361+ install -D agent/target/transformed/uefi.properties ${RPM_BUILD_ROOT}%{_sysconfdir }/%{name }/agent/uefi.properties
361362install -D agent/target/transformed/environment.properties ${RPM_BUILD_ROOT}%{_sysconfdir }/%{name }/agent/environment.properties
362363install -D agent/target/transformed/log4j-cloud.xml ${RPM_BUILD_ROOT}%{_sysconfdir }/%{name }/agent/log4j-cloud.xml
363364install -D agent/target/transformed/cloud-setup-agent ${RPM_BUILD_ROOT}%{_bindir }/%{name }-setup-agent
@@ -525,14 +526,22 @@ mkdir -m 0755 -p /usr/share/cloudstack-agent/tmp
525526/usr/bin/systemctl enable cloudstack-rolling-maintenance@p > /dev/null 2> &1 || true
526527/usr/bin/systemctl enable --now rngd > /dev/null 2> &1 || true
527528
528- # if saved configs from upgrade exist, copy them over
529+ # if saved agent.properties from upgrade exist, copy them over
529530if [ -f "%{_sysconfdir }/cloud.rpmsave/agent/agent.properties" ]; then
530531 mv %{_sysconfdir }/%{name }/agent/agent.properties %{_sysconfdir }/%{name }/agent/agent.properties.rpmnew
531532 cp -p %{_sysconfdir }/cloud.rpmsave/agent/agent.properties %{_sysconfdir }/%{name }/agent
532533 # make sure we only do this on the first install of this RPM, don't want to overwrite on a reinstall
533534 mv %{_sysconfdir }/cloud.rpmsave/agent/agent.properties %{_sysconfdir }/cloud.rpmsave/agent/agent.properties.rpmsave
534535fi
535536
537+ # if saved uefi.properties from upgrade exist, copy them over
538+ if [ -f "%{_sysconfdir }/cloud.rpmsave/agent/uefi.properties" ]; then
539+ mv %{_sysconfdir }/%{name }/agent/uefi.properties %{_sysconfdir }/%{name }/agent/uefi.properties.rpmnew
540+ cp -p %{_sysconfdir }/cloud.rpmsave/agent/uefi.properties %{_sysconfdir }/%{name }/agent
541+ # make sure we only do this on the first install of this RPM, don't want to overwrite on a reinstall
542+ mv %{_sysconfdir }/cloud.rpmsave/agent/uefi.properties %{_sysconfdir }/cloud.rpmsave/agent/uefi.properties.rpmsave
543+ fi
544+
536545systemctl daemon-reload
537546
538547# Print help message
@@ -603,6 +612,7 @@ pip3 install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
603612%config(noreplace) %attr(0640,root,cloud) %{_sysconfdir }/%{name }/management/config.json
604613%config(noreplace) %{_sysconfdir }/%{name }/management/log4j-cloud.xml
605614%config(noreplace) %{_sysconfdir }/%{name }/management/log4j2.xml
615+ %config(noreplace) %{_sysconfdir }/%{name }/management/uefi.properties
606616%config(noreplace) %{_sysconfdir }/%{name }/management/environment.properties
607617%config(noreplace) %{_sysconfdir }/%{name }/management/java.security.ciphers
608618%config(noreplace) %attr(0644,root,root) %{_sysconfdir }/logrotate.d/%{name }-management
0 commit comments