!66 The postun script should distinguish uninstall and upgrade scenarios
From: @BornThisWay Reviewed-by: @houmingyong Signed-off-by: @houmingyong
This commit is contained in:
commit
bfa82294b7
@ -1,6 +1,6 @@
|
||||
Name: linux-sgx
|
||||
Version: 2.15.1
|
||||
Release: 7
|
||||
Release: 8
|
||||
Summary: Intel(R) Software Guard Extensions for Linux* OS
|
||||
ExclusiveArch: x86_64
|
||||
License: BSD-3-Clause
|
||||
@ -887,26 +887,28 @@ echo -e "Installation succeed!"
|
||||
systemctl start mpa_registration_tool.service
|
||||
|
||||
%postun -n sgx-ra-service
|
||||
# Generate the script to setup environment variables
|
||||
MPA_DST_PATH=/opt/intel/sgx-ra-service
|
||||
if [ "$1" = "0" ]; then
|
||||
# Generate the script to setup environment variables
|
||||
MPA_DST_PATH=/opt/intel/sgx-ra-service
|
||||
|
||||
# Disable service
|
||||
if [ -d /run/systemd/users ]; then
|
||||
systemctl disable mpa_registration_tool.service
|
||||
# Disable service
|
||||
if [ -d /run/systemd/users ]; then
|
||||
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
|
||||
|
||||
# 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!"
|
||||
|
||||
%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
|
||||
|
||||
%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
|
||||
- add strip compilation option for pck-id-retrieval-tool
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user