The postun script should distinguish uninstall and upgrade scenarios
Signed-off-by: modric <wangyu283@huawei.com> (cherry picked from commit 8e16710b96a0e168a5711fa5a785bdbfe4b72353)
This commit is contained in:
parent
0ba6e4b9b3
commit
60aa047104
@ -1,6 +1,6 @@
|
|||||||
Name: linux-sgx
|
Name: linux-sgx
|
||||||
Version: 2.15.1
|
Version: 2.15.1
|
||||||
Release: 7
|
Release: 8
|
||||||
Summary: Intel(R) Software Guard Extensions for Linux* OS
|
Summary: Intel(R) Software Guard Extensions for Linux* OS
|
||||||
ExclusiveArch: x86_64
|
ExclusiveArch: x86_64
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
@ -887,26 +887,28 @@ echo -e "Installation succeed!"
|
|||||||
systemctl start mpa_registration_tool.service
|
systemctl start mpa_registration_tool.service
|
||||||
|
|
||||||
%postun -n sgx-ra-service
|
%postun -n sgx-ra-service
|
||||||
# Generate the script to setup environment variables
|
if [ "$1" = "0" ]; then
|
||||||
MPA_DST_PATH=/opt/intel/sgx-ra-service
|
# Generate the script to setup environment variables
|
||||||
|
MPA_DST_PATH=/opt/intel/sgx-ra-service
|
||||||
|
|
||||||
# Disable service
|
# Disable service
|
||||||
if [ -d /run/systemd/users ]; then
|
if [ -d /run/systemd/users ]; then
|
||||||
systemctl disable mpa_registration_tool.service
|
systemctl disable mpa_registration_tool.service
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Removing MPA configuration file
|
||||||
|
rm -f /etc/init/mpa_registration_tool.conf
|
||||||
|
rm -f /lib/systemd/system/mpa_registration_tool.service
|
||||||
|
rm -f /usr/lib/systemd/system/mpa_registration_tool.service
|
||||||
|
rm -f /etc/systemd/system/mpa_registration_tool.service
|
||||||
|
|
||||||
|
# Removing MPA folder
|
||||||
|
rm -rf $MPA_DST_PATH
|
||||||
|
|
||||||
|
#Removing log file
|
||||||
|
rm -f /var/log/mpa_registration.log
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Removing MPA configuration file
|
|
||||||
rm -f /etc/init/mpa_registration_tool.conf
|
|
||||||
rm -f /lib/systemd/system/mpa_registration_tool.service
|
|
||||||
rm -f /usr/lib/systemd/system/mpa_registration_tool.service
|
|
||||||
rm -f /etc/systemd/system/mpa_registration_tool.service
|
|
||||||
|
|
||||||
# Removing MPA folder
|
|
||||||
rm -rf $MPA_DST_PATH
|
|
||||||
|
|
||||||
#Removing log file
|
|
||||||
rm -f /var/log/mpa_registration.log
|
|
||||||
|
|
||||||
echo -e "Uninstallation succeed!"
|
echo -e "Uninstallation succeed!"
|
||||||
|
|
||||||
%postun -n sgx-pck-id-retrieval-tool
|
%postun -n sgx-pck-id-retrieval-tool
|
||||||
@ -1030,6 +1032,9 @@ fi
|
|||||||
%files -n libsgx-headers -f %{LINUX_INSTALLER_RPM_DIR}/libsgx-headers/build/list-libsgx-headers
|
%files -n libsgx-headers -f %{LINUX_INSTALLER_RPM_DIR}/libsgx-headers/build/list-libsgx-headers
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Sep 24 2022 wangyu <wangyu283@huawei.com> - 2.15.1-8
|
||||||
|
- The postun script should distinguish uninstall and upgrade scenarios
|
||||||
|
|
||||||
* Tue Sep 20 2022 wangyu <wangyu283@huawei.com> - 2.15.1-7
|
* Tue Sep 20 2022 wangyu <wangyu283@huawei.com> - 2.15.1-7
|
||||||
- add strip compilation option for pck-id-retrieval-tool
|
- add strip compilation option for pck-id-retrieval-tool
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user