Stop enabling services in %post
Since we enable cloud-init services in the cloud product kickstart enabling the service in %post is no longer necessary. This also makes now a convenient time to switch to systemd's rpm script macros as well. https://bugzilla.redhat.com/show_bug.cgi?id=850058
This commit is contained in:
parent
c33ce8c1e0
commit
469555be6b
@ -123,28 +123,15 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ $1 -eq 1 ] ; then
|
# These services are now enabled by the cloud image's kickstart.
|
||||||
# Initial installation
|
# They should probably be done with a preset instead.
|
||||||
# Enabled by default per "runs once then goes away" exception
|
%systemd_post cloud-config.service cloud-final.service cloud-init.service cloud-init-local.service
|
||||||
/bin/systemctl enable cloud-config.service >/dev/null 2>&1 || :
|
|
||||||
/bin/systemctl enable cloud-final.service >/dev/null 2>&1 || :
|
|
||||||
/bin/systemctl enable cloud-init.service >/dev/null 2>&1 || :
|
|
||||||
/bin/systemctl enable cloud-init-local.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ] ; then
|
%systemd_preun cloud-config.service cloud-final.service cloud-init.service cloud-init-local.service
|
||||||
# Package removal, not upgrade
|
|
||||||
/bin/systemctl --no-reload disable cloud-config.service >/dev/null 2>&1 || :
|
|
||||||
/bin/systemctl --no-reload disable cloud-final.service >/dev/null 2>&1 || :
|
|
||||||
/bin/systemctl --no-reload disable cloud-init.service >/dev/null 2>&1 || :
|
|
||||||
/bin/systemctl --no-reload disable cloud-init-local.service >/dev/null 2>&1 || :
|
|
||||||
# One-shot services -> no need to stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
%systemd_postun
|
||||||
# One-shot services -> no need to restart
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -180,6 +167,7 @@ fi
|
|||||||
- Fixed handling of user group lists that contain spaces [RH:1126365 LP:1354694]
|
- Fixed handling of user group lists that contain spaces [RH:1126365 LP:1354694]
|
||||||
- Changed network.target systemd deps to network-online.target [RH:1110731 RH:1112817 RH:1147613]
|
- Changed network.target systemd deps to network-online.target [RH:1110731 RH:1112817 RH:1147613]
|
||||||
- Fixed race condition between cloud-init.service and the login prompt
|
- Fixed race condition between cloud-init.service and the login prompt
|
||||||
|
- Stopped enabling services in %%post (now done by kickstart) [RH:850058]
|
||||||
|
|
||||||
* Fri Nov 14 2014 Colin Walters <walters@redhat.com> - 0.7.6-2
|
* Fri Nov 14 2014 Colin Walters <walters@redhat.com> - 0.7.6-2
|
||||||
- New upstream version [RH:974327]
|
- New upstream version [RH:974327]
|
||||||
|
Loading…
Reference in New Issue
Block a user