From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Wed, 30 Nov 2005 07:39:18 +0000 Subject: Re: problem with PROGRAM Message-Id: <20051130073918.GA6175@kroah.com> List-Id: References: <438D4B0F.5050303@magellan-technology.com> In-Reply-To: <438D4B0F.5050303@magellan-technology.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Wed, Nov 30, 2005 at 05:47:43PM +1100, Aras Vaichas wrote: > Hi, > > I'm getting udev to work with a usb ethernet device (also Linux based) and > Zeroconf. > > What I need to do is run the autoipd daemon on network device usb0 when it > appears, and remove autoipd when network device usb0 disappears. > > adding was easy: > ACTION="add", PHYSDEVDRIVER="usbnet", PROGRAM="/usr/bin/autoipd -i %k" > > My first attempt was to simply killall processes called autoipd. This works > OK, but isn't the best method. > > ACTION="remove", PHYSDEVDRIVER="usbnet", PROGRAM="/usr/bin/killall > autoipd" > > > The second option was to kill only the autoipd process for usb0 > > ACTION="remove", PHYSDEVDRIVER="usbnet", PROGRAM="/usr/bin/cat > /var/run/autoipd-usb0.pid | /usr/bin/xargs /bin/kill" > > but this doesn't work and I don't know why. Am I allowed to use a pipe in > the PROGRAM field? No, try putting that into a shell script. That should work properly. thanks, greg k-h ------------------------------------------------------- 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_id865&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