Files
rocm-systems/DEBIAN/prerm.in
T
Saravanan Solaiyappan 3a3b8dd25d Consider apt/yum upgrade operation check in package scripts.
Include the upgrade operation check in the prerm and postun scripts
for rocm-smi-lib package.

Signed-off-by: Saravanan Solaiyappan <saravanan.solaiyappan@amd.com>
Change-Id: Ic3dee7ae50a2ac317f1aab88472b6d4805c4de90
2022-02-24 10:11:32 -05:00

23 lines
336 B
Bash
Executable File

#!/bin/bash
set -e
rm_ldconfig() {
# left-hand term originates from ENABLE_LDCONFIG = ON/OFF at package build
if [ "@ENABLE_LDCONFIG@" == "ON" ]; then
rm -f /etc/ld.so.conf.d/x86_64-librocm_smi_lib.conf
ldconfig
fi
}
case "$1" in
( remove | upgrade)
rm_ldconfig
;;
( purge )
;;
( * )
exit 0
;;
esac