OpenWrt Forum Archive

Topic: Hotplug2 Rules - No Button Scripts Will Run

The content of this topic has been archived on 4 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Maybe I don't understand this fully, but what would make either button on my 54GL after boot, just close all my connections? And I can't ssh back in, have to unplug.

To get my button scripts to run I had to change this in /etc/hotplug2-init.rules:
from

SUBSYSTEM ~~ button {
        exec kill -USR1 1 ;
}

to

SUBSYSTEM ~~ button {
        exec /sbin/hotplug-call button;
}

And my scripts in /etc/hotplug.d at least run now.  Was it always killing all my procs?

I would think this rule in /etc/hotplug2.rules would run (Edit: I think is does run too):

SUBSYSTEM ~~ (net|button|usb) {
        exec /sbin/hotplug-call %SUBSYSTEM%;
}

/etc/hotplug2.rules includes /etc/hotplug2-init.rules so is the first rule in the init file always hit?

Thanks.

(Last edited by pricejm on 5 Jan 2008, 18:57)

That was a bug. Already fixed in trunk with https://dev.openwrt.org/changeset/9644

You loose the connection because the system justs halts after pressing any button.

(Last edited by forum2008 on 5 Jan 2008, 21:16)

Ok, Seems like I got it fixed with what I did above.

I'll have to add the tickets to my list of searches now to find answers...

(Last edited by pricejm on 5 Jan 2008, 21:29)

The discussion might have continued from here.