diff options
Diffstat (limited to 'sys-cluster/rdma-core/files/srpd.init')
-rw-r--r-- | sys-cluster/rdma-core/files/srpd.init | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sys-cluster/rdma-core/files/srpd.init b/sys-cluster/rdma-core/files/srpd.init new file mode 100644 index 000000000000..c54e5d81ed58 --- /dev/null +++ b/sys-cluster/rdma-core/files/srpd.init @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/srp_daemon.sh" +pidfile="/run/${SVCNAME}.pid" +start_stop_daemon_args="-b -m" + +rdma_config="/etc/infiniband/openib.conf" +[ -f ${rdma_config} ] && source ${rdma_config}" + +[ ${SRP_DEFAULT_TL_RETRY_COUNT} ] && command_args="-l ${SRP_DEFAULT_TL_RETRY_COUNT}" + +start_pre() { + if ! [ -e /sys/module/ib_srp ]; then + eerror "SRP kernel module is not loaded, unable to start SRP daemon" + return 1 + fi + return 0 +} |