On Mar 15, 2012 2:24 AM, "Pandu Poluan" <pa...@poluan.info> wrote:
>
> Here's a prototype script to ensure that certain NICs will always end up
the way you want it named:
>

#!/bin/sh
mac="$( cat /proc/net/arp | awk -V dev="$MDEV" 'NR==1{next} $6==dev {print
$4}')"
name="$(cat /etc/nic.conf | awk -V mac="$mac" '$1==mac {print $2}')"
[ "$name" ] && mv /dev/$MDEV /dev/$name
exit 0

>
> (Prototype, because I don't have access to a Linux box atm, so I can't
test)
>

Eh, forgot the input file for the second awk :-P

Rgds,

Reply via email to