You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-cluster/lustre/files/lnet.initd

46 lines
933 B

#!/sbin/openrc-run
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="Loads lnet module and configures network."
depend() {
need net
after bootmisc
}
start() {
if [ "${RC_CMD}" = "restart" ];
then
einfo "Restarting..."
fi
ebegin "Loading LNet modules:"
modprobe lnet
eend $*
ebegin "Bringing up LNet"
lnetctl lnet configure --all
eend $*
}
stop() {
local LNETMODULES=( "ko2iblnd" "lnet" "libcfs" )
ebegin "Bringing down LNet"
lnetctl lnet unconfigure --all
eend $*
einfo "Unloading LNet modules:"
for mod in ${LNETMODULES[@]}; do
ebegin "... ${mod}"
modprobe -r ${mod}
eend $*
done
}
status()
{
einfo "LNet status:"
lnetctl net show
}