RDC:Move rdc deamon to rocm path.

Installing files to standard path across each version and using
ldconfig has issues with side-by-side install.

Usage of RUNPATH/RPATH for ROCm to ensure all ROCm libraries are
picked without the need for ldconfig.

For RDC server to be picked up by systemctl, service config file
shall be a symlink from /lib/systemctl/system/rdc.service to
corresponding RDC file path in a given version of ROCm

For side-by-side install packages of RDC post install scripts
will be removed. Hence Use will have to set the symlink explicitly
for now.

Change-Id: I916da7cf132f0f9c667e2470fac2b0875e3db9d0
此提交包含在:
Freddy Paul
2020-11-13 16:13:25 -08:00
提交者 Freddy Paul
父節點 81ad23343c
當前提交 fe1593dda5
共有 10 個檔案被更改,包括 94 行新增38 行删除
+8 -12
查看文件
@@ -1,28 +1,24 @@
#/bin/bash
RDC_LIB_DIR=@RDC_CLIENT_ROOT_PATH@/rdc/lib
GRPC_LIB_DIR=@RDC_CLIENT_ROOT_PATH@/grpc/lib
# This will return 0 if an id is created and non-zero if
# it already exists
do_create_rdc_user() {
useradd -r -s /bin/nologin rdc
# Make sure this doesn't return non-zero if an id already exists
return 0
}
# librdc_client.so
do_ldconfig() {
echo "$RDC_LIB_DIR" > /etc/ld.so.conf.d/x86_64-librdc_client.conf
echo "$GRPC_LIB_DIR" >> /etc/ld.so.conf.d/x86_64-librdc_client.conf && ldconfig
do_create_rdc_user
# Make sure this doesn't return non-zero if an id already exists
reload_systemd() {
systemctl daemon-reload
return 0
}
case "$1" in
configure)
do_ldconfig
do_create_rdc_user
#Symlink RDC Service
ln -s -f -r /@RDC_CLIENT_INSTALL_PREFIX@/rdc/lib/rdc.service /lib/systemd/system/rdc.service
reload_systemd
exit 0
;;
abort-upgrade|abort-remove|abort-deconfigure)
可執行檔
+16
查看文件
@@ -0,0 +1,16 @@
stop_rdc() {
#stop RDC if running
systemctl stop rdc
return 0
}
reload_systemd() {
systemctl daemon-reload
return 0
}
if [ $1 -eq 0 ]; then
stop_rdc
unlink @DISTRO_ROOT@/rdc.service
reload_systemd
fi
+11 -8
查看文件
@@ -1,16 +1,19 @@
#!/bin/bash
RDC_LIB_DIR=@RDC_CLIENT_ROOT_PATH@/rdc/lib
GRPC_LIB_DIR=@RDC_CLIENT_ROOT_PATH@/grpc/lib
do_create_rdc_user() {
useradd -r -s /bin/nologin rdc
# Make sure this doesn't return non-zero if an id already exists
return 0
}
reload_systemd() {
systemctl daemon-reload
return 0
}
do_create_rdc_user
echo "$GRPC_LIB_DIR" > /etc/ld.so.conf.d/x86_64-librdc_client.conf
echo "$GRPC_LIB_DIR"64 >> /etc/ld.so.conf.d/x86_64-librdc_client.conf
echo "$RDC_LIB_DIR" >> /etc/ld.so.conf.d/x86_64-librdc_client.conf
echo "$RDC_LIB_DIR"64 >> /etc/ld.so.conf.d/x86_64-librdc_client.conf
ldconfig
#Symlink RDC Service
ln -s -f -r /@RDC_CLIENT_INSTALL_PREFIX@/rdc/lib/rdc.service @DISTRO_ROOT@/rdc.service
#Request systemctl to reload file since RDC is adding new file/service
reload_systemd