On Fri, 20 Jul 2007 09:28:55 +0200 (CEST) Bartłomiej Rutkowski <[EMAIL PROTECTED]> wrote:
> Hi all, > > I have been playing with OpenOspf lately, and I came to a place, when I > needed to ensure that an ethernet interface should always go into DOWN state > when it loses its link (physically, for example the switch becames turned > off). I have tried to hire the devd daemon to do the job with such small > definitions: > > notify 100 { > match "system" "IFNET"; > match "type" "LINK_DOWN"; > media-type "ethernet"; > action "/sbin/ifconfig $subsystem down"; > }; > > notify 200 { > match "system" "IFNET"; > match "type" "LINK_UP"; > media-type "ethernet"; > action "/sbin/ifconfig $subsystem up"; > }; > > And what is happening? Well, basically, when the interface detects that eth > cable has been detached, devd triggers and makes it DOWN, which is ok. But, > when the card got the cable attached once again (and interface detects the > media type and gets ACTIVE state) devd never triggers the second rule, which > should get the interface UP again. > I have tried that with replacing action statements with ones with proper > logging actions, and when interface is UP devd gets the proper state changes > information. > > Now the question is: why devd doesent receive any information from interfaces > in DOWN state? Is that proper behaviour, or a bug? Thanks for any reply, and > for your attention. > hi , What do you get when you run devd in debug mode : /etc/rc.d/devd stop /sbin/devd -d -D in my case, i get the following on pulling the cat5 on bge0 [EMAIL PROTECTED] [Fri Jul 20 20:36:28 2007] /usr/home/betom # /sbin/devd -D -d Parsing /etc/devd.conf setting scsi-controller-regex=(aac|adv|adw|aha|ahb|ahc|ahd|aic|amd|amr|asr|bt|ciss|ct|dpt|esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm|wds)[0-9]+ Parsing files in /etc/devd Parsing files in /usr/local/etc/devd Parsing /usr/local/etc/devd/ayiin.conf Processing event '!system=IFNET subsystem=bge0 type=LINK_DOWN' Pushing table setting system=IFNET setting subsystem=bge0 setting type=LINK_DOWN Processing notify event Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^IFNET Testing type=LINK_DOWN against ^ATTACH Testing system=IFNET against ^IFNET Testing type=LINK_DOWN against ^DETACH Testing system=IFNET against ^IFNET Testing type=LINK_DOWN against ^LINK_UP Testing system=IFNET against ^IFNET Testing type=LINK_DOWN against ^LINK_UP Popping table [AND HERE I PLUG IT BACK IN ] Processing event '!system=IFNET subsystem=bge0 type=LINK_UP' Pushing table setting system=IFNET setting subsystem=bge0 setting type=LINK_UP Processing notify event Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^ACPI Testing system=IFNET against ^IFNET Testing type=LINK_UP against ^ATTACH Testing system=IFNET against ^IFNET Testing type=LINK_UP against ^DETACH Testing system=IFNET against ^IFNET Testing type=LINK_UP against ^LINK_UP Testing media type of bge0 against 0x20 bge0 has media type 0x20 Executing '/etc/rc.d/dhclient start bge0' Popping table ----- do you get the LINK_UP event at all? Otherwise, you should be able to figure out what the issue is with your config file ... Good luck, _________________________ {Beto|Norberto|Numard} Meijome "Too bad ignorance isn't painful." Don Lindsay I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned. _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"