Skip to content

Commit f3a46de

Browse files
Updated install/spec files
1 parent 92b5fc9 commit f3a46de

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

debian/cloudstack-agent.install

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# under the License.
1717

1818
/etc/cloudstack/agent/agent.properties
19+
/etc/cloudstack/agent/uefi.properties
1920
/etc/cloudstack/agent/environment.properties
2021
/etc/cloudstack/agent/log4j-cloud.xml
2122
/etc/default/cloudstack-agent

debian/cloudstack-agent.postinst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ case "$1" in
2323
configure)
2424
OLDCONFDIR="/etc/cloud/agent"
2525
NEWCONFDIR="/etc/cloudstack/agent"
26-
CONFFILES="agent.properties log4j.xml log4j-cloud.xml"
26+
CONFFILES="agent.properties uefi.properties log4j.xml log4j-cloud.xml"
2727

2828
mkdir -m 0755 -p /usr/share/cloudstack-agent/tmp
2929

packaging/el8/cloud.spec

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ install -D packaging/systemd/cloudstack-agent.service ${RPM_BUILD_ROOT}%{_unitdi
358358
install -D packaging/systemd/[email protected] ${RPM_BUILD_ROOT}%{_unitdir}/%{name}[email protected]
359359
install -D packaging/systemd/cloudstack-agent.default ${RPM_BUILD_ROOT}%{_sysconfdir}/default/%{name}-agent
360360
install -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
361362
install -D agent/target/transformed/environment.properties ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/agent/environment.properties
362363
install -D agent/target/transformed/log4j-cloud.xml ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/agent/log4j-cloud.xml
363364
install -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
529530
if [ -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
534535
fi
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+
536545
systemctl daemon-reload
537546

538547
# Print help message

0 commit comments

Comments
 (0)