File: opensm.service

package info (click to toggle)
opensm 3.3.23-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,932 kB
  • sloc: ansic: 97,383; yacc: 2,227; sh: 685; lex: 404; makefile: 391; perl: 143
file content (15 lines) | stat: -rw-r--r-- 714 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[Unit]
Description=Starts the OpenSM InfiniBand fabric Subnet Managers
Documentation=man:opensm(8)
Before=network.target remote-fs-pre.target
ConditionPathExists=/sys/class/infiniband_mad/abi_version

[Service]
Type=oneshot
EnvironmentFile=/etc/default/opensm
ExecCondition=/bin/sh -c 'if test "$PORTS" = NONE; then echo "opensm is disabled via PORTS=NONE."; exit 1; fi'
ExecStart=/bin/sh -c 'if test "$PORTS" = ALL; then PORTS=$(/usr/sbin/ibstat -p); if test -z "$PORTS"; then echo "No InfiniBand ports found."; exit 0; fi; fi; echo "Starting opensm on following ports: $PORTS"; systemctl start $(echo $PORTS | sed -r "s/(\\w+)/opensm@\\1.service/g")'
RemainAfterExit=on

[Install]
WantedBy=network-online.target