You are not logged in.

#1 2009-07-13 13:16:57

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

udev runs rules but it has no effect

since kernel 2.6.31-rc2, the rfkill switch on my notebook starts working. im trying to access it and make it restart the wireless network with netcfg. in order to do this im setting the following rule in /etc/udev/rules.d/rfkill.rules

SUBSYSTEM=="rfkill", ATTRS{state}=="1", RUN+="/etc/rc.d/net-auto restart"
SUBSYSTEM=="rfkill", ATTRS{state}=="0", RUN+="/etc/rc.d/net-auto stop"

these dont work.

if, instead i make it output something to a file replacing the RUN+= entry with for example "date > /etc/rfkill_test" it does work.

is there any restriction on what udev can do?

it appears netcfg2 is not working properly when called from udev. can anyone help?

Offline

#2 2009-07-13 23:13:58

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: udev runs rules but it has no effect

What does it mean by you "not work" ? Is there any error message?

Offline

#3 2009-07-13 23:41:46

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: udev runs rules but it has no effect

nope, nothing... the rule is being run, the script is being run, but it acts as if it had no root priviledge.... yet, on a test case, i wrote a file in /etc with it...

Offline

#4 2009-07-14 05:31:33

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: udev runs rules but it has no effect

something else ive been seeing. whenever a script runs without an interactive shell (aka, from cron, udev, or pm-suspend), they fail with these errors:

/bin/stty: standard input: Inappropriate ioctl for device dbus

can anyone help debug this? net-auto for example, fails to load the network during boot.

ive been tweaking my kernel to speed up compile time (removed drivers mostly), could this be the culprit? kernel config here in pastebin: http://pastebin.com/m239980e7

Offline

Board footer

Powered by FluxBB