Add postinst and prerm scripts for debian and rpm
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
Package: rocm_smi_lib
|
||||
Architecture: amd64
|
||||
Maintainer: Advanced Micro Devices Inc.
|
||||
Priority: optional
|
||||
Version: MODULE_VERSION
|
||||
Depends:
|
||||
Homepage: https://github.com/RadeonOpenCompute/rocm_smi_lib
|
||||
Description: System Management Interface Library for ROCm
|
||||
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
do_ldconfig() {
|
||||
echo /opt/rocm/lib > /etc/ld.so.conf.d/x86_64-librocm_smi_lib.conf && ldconfig
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
do_ldconfig
|
||||
;;
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
echo "$1"
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
rm_ldconfig() {
|
||||
rm -f /etc/ld.so.conf.d/x86_64-librocm_smi_lib.conf && ldconfig
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
remove)
|
||||
rm_ldconfig
|
||||
;;
|
||||
purge)
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/opt/rocm/lib
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
echo -e "/opt/rocm/lib\n/opt/rocm/lib64" > /etc/ld.so.conf.d/x86_64-librocm_smi_lib.conf && ldconfig
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
if [ $1 -eq 0 ]; then
|
||||
rm -f /etc/ld.so.conf.d/x86_64-librocm_smi_lib.conf && ldconfig
|
||||
fi
|
||||
Fai riferimento in un nuovo problema
Block a user