Gentoo Archives: gentoo-user

From: Pandu Poluan <pandu@××××××.info>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Beta test Gentoo with mdev instead of udev; version 5 - failure :-(
Date: Wed, 14 Mar 2012 19:30:56
Message-Id: CAA2qdGXEF4d9SqwCnOkVZXmKZJVirNuJUVqGsN2m2A+H=J9rvw@mail.gmail.com
In Reply to: Re: [gentoo-user] Beta test Gentoo with mdev instead of udev; version 5 - failure :-( by Pandu Poluan
1 On Mar 15, 2012 2:24 AM, "Pandu Poluan" <pandu@××××××.info> wrote:
2 >
3 > Here's a prototype script to ensure that certain NICs will always end up
4 the way you want it named:
5 >
6
7 #!/bin/sh
8 mac="$( cat /proc/net/arp | awk -V dev="$MDEV" 'NR==1{next} $6==dev {print
9 $4}')"
10 name="$(cat /etc/nic.conf | awk -V mac="$mac" '$1==mac {print $2}')"
11 [ "$name" ] && mv /dev/$MDEV /dev/$name
12 exit 0
13
14 >
15 > (Prototype, because I don't have access to a Linux box atm, so I can't
16 test)
17 >
18
19 Eh, forgot the input file for the second awk :-P
20
21 Rgds,