3a3b8dd25d
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
23 lines
336 B
Bash
Executable File
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
|