From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S7tuS-0008C9-Fk for garchives@archives.gentoo.org; Wed, 14 Mar 2012 19:30:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 00B1AE095F; Wed, 14 Mar 2012 19:30:36 +0000 (UTC) Received: from svr-us4.tirtonadi.com (svr-us4.tirtonadi.com [69.65.43.212]) by pigeon.gentoo.org (Postfix) with ESMTP id 88A7FE079F for ; Wed, 14 Mar 2012 19:29:30 +0000 (UTC) Received: from mail-ee0-f53.google.com ([74.125.83.53]) by svr-us4.tirtonadi.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.69) (envelope-from ) id 1S7tt7-000GiD-2d for gentoo-user@lists.gentoo.org; Thu, 15 Mar 2012 02:29:33 +0700 Received: by eekb47 with SMTP id b47so1396255eek.40 for ; Wed, 14 Mar 2012 12:29:24 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.52.88.103 with SMTP id bf7mr2784637vdb.72.1331753363756; Wed, 14 Mar 2012 12:29:23 -0700 (PDT) Received: by 10.220.58.200 with HTTP; Wed, 14 Mar 2012 12:29:23 -0700 (PDT) Received: by 10.220.58.200 with HTTP; Wed, 14 Mar 2012 12:29:23 -0700 (PDT) In-Reply-To: References: <20120313130534.GB3457@acm.acm> <20120313190052.GA2430@waltdnes.org> <20120313194727.GB2536@acm.acm> <20120313210737.GD2536@acm.acm> <20120313213330.78c5ebf7@digimed.co.uk> <20120313222019.GE2536@acm.acm> <20120313230358.GF2536@acm.acm> <20120314151620.GB24395@acm.acm> Date: Thu, 15 Mar 2012 02:29:23 +0700 Message-ID: Subject: Re: [gentoo-user] Beta test Gentoo with mdev instead of udev; version 5 - failure :-( From: Pandu Poluan To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=20cf307f3c042cd7e004bb38fe68 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - svr-us4.tirtonadi.com X-AntiAbuse: Original Domain - lists.gentoo.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - poluan.info X-Archives-Salt: 2912a983-5ca8-4c25-8003-3b46f8e9a756 X-Archives-Hash: 825b16aee9bbcb56bc2955fe9e6ce5c8 --20cf307f3c042cd7e004bb38fe68 Content-Type: text/plain; charset=UTF-8 On Mar 15, 2012 2:24 AM, "Pandu Poluan" 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, --20cf307f3c042cd7e004bb38fe68 Content-Type: text/html; charset=UTF-8


On Mar 15, 2012 2:24 AM, "Pandu Poluan" <pandu@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,

--20cf307f3c042cd7e004bb38fe68--