NICs devices switches "pshycial" place on each boot

Martin Hanson greencoppermine at yandex.com
Thu Dec 4 20:42:49 UTC 2014


> =======
> 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.


More information about the freebsd-net mailing list