Change-Id: I9ecbcc37cac50abaedbaf7a79ecc522213952ddd
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/1803
Reviewed-by: Divya Thaluru <dthaluru@vmware.com>
Tested-by: Divya Thaluru <dthaluru@vmware.com>
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
Name: cloud-init |
| 2 | 2 |
Version: 0.7.6 |
| 3 |
-Release: 13%{?dist}
|
|
| 3 |
+Release: 14%{?dist}
|
|
| 4 | 4 |
Summary: Cloud instance init scripts |
| 5 | 5 |
Group: System Environment/Base |
| 6 | 6 |
License: GPLv3 |
| ... | ... |
@@ -60,26 +60,27 @@ cp -p %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/cloud/cloud.cfg
|
| 60 | 60 |
%clean |
| 61 | 61 |
rm -rf $RPM_BUILD_ROOT |
| 62 | 62 |
|
| 63 |
-%pre |
|
| 64 |
-if [ -f /usr/lib/systemd/system/cloud-final.service ]; then |
|
| 65 |
- cp /usr/lib/systemd/system/cloud-final.service /usr/lib/systemd/system/cloud-final.service.bak |
|
| 66 |
- sed -i "s@ExecStart=.*@ExecStart=/usr/bin/cloud-init --version@g" /usr/lib/systemd/system/cloud-final.service |
|
| 67 |
-fi |
|
| 68 |
-if [ -f /usr/lib/systemd/system/cloud-init.service ]; then |
|
| 69 |
- cp /usr/lib/systemd/system/cloud-init.service /usr/lib/systemd/system/cloud-init.service.bak |
|
| 70 |
- sed -i "s@ExecStart=.*@ExecStart=/usr/bin/cloud-init --version@g" /usr/lib/systemd/system/cloud-init.service |
|
| 71 |
-fi |
|
| 72 |
-if [ -f /usr/lib/systemd/system/cloud-config.service ]; then |
|
| 73 |
- cp /usr/lib/systemd/system/cloud-config.service /usr/lib/systemd/system/cloud-config.service.bak |
|
| 74 |
- sed -i "s@ExecStart=.*@ExecStart=/usr/bin/cloud-init --version@g" /usr/lib/systemd/system/cloud-config.service |
|
| 75 |
-fi |
|
| 76 |
-if [ -f /usr/lib/systemd/system/cloud-init-local.service ]; then |
|
| 77 |
- cp /usr/lib/systemd/system/cloud-init-local.service /usr/lib/systemd/system/cloud-init-local.service.bak |
|
| 78 |
- sed -i "s@ExecStart=.*@ExecStart=/usr/bin/cloud-init --version@g" /usr/lib/systemd/system/cloud-init-local.service |
|
| 63 |
+%post |
|
| 64 |
+if [ $1 -eq 2 ]; then |
|
| 65 |
+ if [ -f /usr/lib/systemd/system/cloud-final.service ]; then |
|
| 66 |
+ cp /usr/lib/systemd/system/cloud-final.service /usr/lib/systemd/system/cloud-final.service.bak |
|
| 67 |
+ sed -i "s@ExecStart=.*@ExecStart=/usr/bin/cloud-init --version@g" /usr/lib/systemd/system/cloud-final.service |
|
| 68 |
+ fi |
|
| 69 |
+ if [ -f /usr/lib/systemd/system/cloud-init.service ]; then |
|
| 70 |
+ cp /usr/lib/systemd/system/cloud-init.service /usr/lib/systemd/system/cloud-init.service.bak |
|
| 71 |
+ sed -i "s@ExecStart=.*@ExecStart=/usr/bin/cloud-init --version@g" /usr/lib/systemd/system/cloud-init.service |
|
| 72 |
+ fi |
|
| 73 |
+ if [ -f /usr/lib/systemd/system/cloud-config.service ]; then |
|
| 74 |
+ cp /usr/lib/systemd/system/cloud-config.service /usr/lib/systemd/system/cloud-config.service.bak |
|
| 75 |
+ sed -i "s@ExecStart=.*@ExecStart=/usr/bin/cloud-init --version@g" /usr/lib/systemd/system/cloud-config.service |
|
| 76 |
+ fi |
|
| 77 |
+ if [ -f /usr/lib/systemd/system/cloud-init-local.service ]; then |
|
| 78 |
+ cp /usr/lib/systemd/system/cloud-init-local.service /usr/lib/systemd/system/cloud-init-local.service.bak |
|
| 79 |
+ sed -i "s@ExecStart=.*@ExecStart=/usr/bin/cloud-init --version@g" /usr/lib/systemd/system/cloud-init-local.service |
|
| 80 |
+ fi |
|
| 81 |
+ systemctl daemon-reload >/dev/null 2>&1 || : |
|
| 79 | 82 |
fi |
| 80 |
-systemctl daemon-reload >/dev/null 2>&1 || : |
|
| 81 | 83 |
|
| 82 |
-%post |
|
| 83 | 84 |
%systemd_post cloud-config.service |
| 84 | 85 |
%systemd_post cloud-final.service |
| 85 | 86 |
%systemd_post cloud-init.service |
| ... | ... |
@@ -124,6 +125,8 @@ systemctl daemon-reload >/dev/null 2>&1 || : |
| 124 | 124 |
|
| 125 | 125 |
|
| 126 | 126 |
%changelog |
| 127 |
+* Thu Dec 1 2016 Divya Thaluru <dthaluru@vmware.com> 0.7.6-14 |
|
| 128 |
+- Moved update logic to post section from pre |
|
| 127 | 129 |
* Tue Nov 22 2016 Kumar Kaushik <kaushikk@vmware.com> 0.7.6-13 |
| 128 | 130 |
- Adding flag for vmware customization in config. |
| 129 | 131 |
* Tue Nov 1 2016 Divya Thaluru <dthaluru@vmware.com> 0.7.6-12 |