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/ansible/roles/system-init-9140/templates/setup.eth_pf_mgmt0.ips.toml.j2
2021-06-30 10:15:25 +08:00

18 lines
387 B
Django/Jinja

#!/bin/bash
INF="$1"
STA="$2"
logger "$0 called for interface named $INF with $STA ..."
if [ "$INF" == "eth_pf_mgmt0" ]
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 eth_pf_mgmt0 $ipaddr netmask 255.255.0.0
fi