-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #122 from lsst-it/IT-2204/lsst-daq-dispatch
add NM dispatch script for DAQ interface device params
- Loading branch information
Showing
2 changed files
with
50 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<%- | String $interface | -%> | ||
#!/bin/sh | ||
|
||
# This file is managed by Puppet; changes may be overwritten | ||
|
||
# https://access.redhat.com/solutions/2841131 | ||
|
||
myname=${0##*/} | ||
log() { logger -p user.info -t "${myname}" "$*"; } | ||
IFACE=$1 | ||
ACTION=$2 | ||
|
||
log "IFACE = $1, ACTION = $2" | ||
|
||
DAQ=<%= $interface %> | ||
|
||
if [ "$IFACE" == "$DAQ" ] && [ "$ACTION" == "up" ]; then | ||
log "ethool set-ring ${IFACE} rx 4096 tx 4096" | ||
/sbin/ethtool --set-ring ${IFACE} rx 4096 tx 4096 | ||
log "ethool pause ${IFACE} autoneg off rx on tx on" | ||
/sbin/ethtool --pause ${IFACE} autoneg off rx on tx on | ||
fi | ||
|
||
exit 0 |