From: Aras Vaichas <arasv@magellan-technology.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: problem with PROGRAM
Date: Thu, 01 Dec 2005 04:34:20 +0000 [thread overview]
Message-ID: <438E7D4C.4030304@magellan-technology.com> (raw)
In-Reply-To: <438D4B0F.5050303@magellan-technology.com>
Kay Sievers wrote:
> On Wed, Nov 30, 2005 at 10:43:30AM -0600, linas wrote:
>>I am guessing/hoping that quotes are escaped, so that the
>>following might work:
>>
>>ACTION="remove", PHYSDEVDRIVER="usbnet", PROGRAM="/bin/sh -c \"/usr/bin/cat
>>/var/run/autoipd-usb0.pid | /usr/bin/xargs /bin/kill\" "
>
>
> No, escaping will not work, you need an external script. And PHYSDEVDRIVER
> is not a key, udev will recognize, it is just ignored, you probably want
> ENV{PHYSDEVDRIVER}=.
I took a look at udev_tools_run.c and I see why it doesn't work. I understand
why it shouldn't work the way I was trying to make it work either. Thanks.
I also realised that running autoipd was leaving a zombie process that was
stopping my remove rule from executing.
rule:
KERNEL="usb[0-9]", ACTION="add", ENV{PHYSDEVDRIVER}="usbnet",
PROGRAM="/etc/udev/scripts/start_autoipd.sh %k"
start_autoipd.sh:
logger "$0 is attempting to start autoipd -i $1"
autoipd -i $1
logger "$0 successful"
exit 0
plug in the USB ethernet device:
/var/log/messages:
logger: /etc/udev/scripts/start_autoipd.sh is attempting to start autoipd -i usb0
logger: /etc/udev/scripts/start_autoipd.sh successful
# ps ax | grep autoipd
30554 ? Z< 0:00 [start_autoipd.s] <defunct>
30557 ? S<s 0:00 autoipd -i usb0
30562 pts/9 R+ 0:00 grep auto
The same happens if simply run autoipd like PROGRAM="/usr/bin/autoipd -i %k"
Have I done something wrong, or should I be bothering the Howl/Zeroconf guys?
regards,
Aras Vaichas
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id\x16865&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2005-12-01 4:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-30 6:47 problem with PROGRAM Aras Vaichas
2005-11-30 7:39 ` Greg KH
2005-11-30 16:43 ` linas
2005-11-30 23:29 ` Kay Sievers
2005-12-01 4:34 ` Aras Vaichas [this message]
2005-12-01 5:00 ` Aras Vaichas
2005-12-02 3:03 ` Kay Sievers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=438E7D4C.4030304@magellan-technology.com \
--to=arasv@magellan-technology.com \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).