代码拉取完成,页面将自动刷新
#!/bin/bash
#
# Launch the necessary OpenSM daemons for systemd
#
# sysconfig: /etc/sysconfig/opensm
# config: /etc/rdma/opensm.conf
#
shopt -s nullglob
prog=/usr/sbin/opensm
[ -f /etc/sysconfig/opensm ] && . /etc/sysconfig/opensm
[ -n "$PRIORITY" ] && prio="-p $PRIORITY"
if [ -z "$GUIDS" ]; then
CONFIGS=""
CONFIG_CNT=0
for conf in /etc/rdma/opensm.conf.[0-9]*; do
CONFIGS="$CONFIGS $conf"
let CONFIG_CNT++
done
else
GUID_CNT=0
for guid in $GUIDS; do
let GUID_CNT++
done
fi
# Start opensm
if [ -n "$GUIDS" ]; then
SUBNET_COUNT=0
for guid in $GUIDS; do
SUBNET_PREFIX=`printf "0xfe800000000000%02d" $SUBNET_COUNT`
(while true; do $prog $prio -g $guid --subnet_prefix $SUBNET_PREFIX; sleep 30; done) &
let SUBNET_COUNT++
done
elif [ -n "$CONFIGS" ]; then
for config in $CONFIGS; do
(while true; do $prog $prio -F $config; sleep 30; done) &
done
else
(while true; do $prog $prio; sleep 30; done) &
fi
exit 0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。