?
Current Path : /lib/dracut/modules.d/40network/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //lib/dracut/modules.d/40network/parse-vlan.sh |
#!/bin/sh # # Format: # vlan=<vlanname>:<phydevice> # parsevlan() { local v=${1}: set -- while [ -n "$v" ]; do set -- "$@" "${v%%:*}" v=${v#*:} done unset vlanname phydevice case $# in 2) vlanname=$1; phydevice=$2 ;; *) die "vlan= requires two parameters" ;; esac } for vlan in $(getargs vlan=); do unset vlanname unset phydevice parsevlan "$vlan" echo "$phydevice" > /tmp/vlan.${phydevice}.phy echo "$vlanname" > /tmp/vlan.${vlanname}.${phydevice} done