From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Wed, 24 Aug 2005 09:05:01 +0000 Subject: Re: udev PROGRAM action Message-Id: <20050824090501.GB5122@vrfy.org> List-Id: References: <430C262A.6020103@xtra.co.nz> In-Reply-To: <430C262A.6020103@xtra.co.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Wed, Aug 24, 2005 at 07:47:54PM +1200, Miles Roper wrote: > Hi, > > I've been trolling around the net trying to find an answer to why I can't > get udev to correctly run a remove event in a script. > > here is my udev line > > BUS="usb", KERNEL="sd*", NAME="%k", PROGRAM="/etc/udev/scripts/usb.sh %k" > > this works fine. it calls the script below... ... > the add event works great. however, the remove event never gets actioned. > In fact the script never gets run when the device is removed. any ideas > why? PROGRAM is for evaluation of the device name. It is called before the device node is created. If you have NAME in a rule, the rule will never be called for any ather action than "add". Just remove "NAME="%k". And better use RUN, it is called after device node handling. Kay ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ 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