Date: Thu, 04 Dec 2014 21:42:30 +0100 From: Martin Hanson <greencoppermine@yandex.com> To: Ian Smith <smithi@nimnet.asn.au> Cc: Warren Block <wblock@wonkity.com>, "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: Re: NICs devices switches "pshycial" place on each boot Message-ID: <114611417725750@web27h.yandex.ru> In-Reply-To: <20141204180007.Q85722@sola.nimnet.asn.au> References: <1511041417624247@web23g.yandex.ru> <alpine.BSF.2.11.1412031024340.32996@wonkity.com> <212351417642134@web20h.yandex.ru> <alpine.BSF.2.11.1412031601220.13301@wonkity.com> <2659291417665100@web17m.yandex.ru> <alpine.BSF.2.11.1412032119080.86447@wonkity.com> <2704971417669266@web25m.yandex.ru> <20141204180007.Q85722@sola.nimnet.asn.au>
next in thread | previous in thread | raw e-mail | index | archive | help
> ======= > I tried that as well, but $device-name is empty. > > If I do this: > > notify 1000 { > šššššmatch "system" "USB"; > šššššmatch "subsystem" "INTERFACE"; > šššššmatch "vendor" "0x0b95"; > šššššmatch "product" "0x1790"; > šššššmatch "sernum" "0000249B0DE00C"; > šššššmatch "type" "ATTACH"; > šššššaction "logger DEVICE NAME IS: $device-name."; > }; > ======= > > Maybe devd does'nt parse quite the same as sh(1), in that your trailing > '.' might be seen as part of the name to match? šTried leaving it off? Yes, I have remove the trailing '.', but $device-name is empty. > Notice the "Dec š4 05:44:14 gateway1 martin: DEVICE NAME IS: .!" part. > ======= > > See above maybe, but then, where did that trailing '!' come from? That was me making a mistake in the email. With the following I can get the device-name "axge0", but I don't know how to create a usable NIC interface name for that. attach 1000 { device-name "axge[0-9]+"; match "vendor" "0x0b95"; match "product" "0x1790"; match "sernum" "0000249B0DE00C"; action "logger DEVICE NAME IS: $device-name"; }; Dec 4 06:41:39 gateway1 devd: Executing 'logger DEVICE NAME IS: axge0' Dec 4 06:41:39 gateway1 martin: DEVICE NAME IS: axge0 What action would I then take to create a usable device for ifconfig? Doing this doesn't work: # ifconfig axge0 name lan1 inet 192.168.1.1 netmask 255.255.255.0 ifconfig: interface axge0 does not exist Kind regards.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?114611417725750>