This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tsg-tsg-os-buildimage/tsg-9140-scripts/roles/system-init/templates/setup.enp131s0f0.ips.toml.j2
2021-05-08 06:49:19 -04:00

18 lines
383 B
Django/Jinja

#!/bin/bash
INF="$1"
STA="$2"
logger "$0 called for interface named $INF with $STA ..."
if [ "$INF" == "enp131s0f0" ]
then
logger "$0: Interface $INF with $STA ,Set $INF ipaddr ..."
output=$(ipmitool picmg addrinfo)
echo $output
substr=${output:22:1}
echo $substr
num=$((16#${substr}+16))
ipaddr='10.254.'$num'.1'
ifconfig enp131s0f0 $ipaddr netmask 255.255.0.0
fi