From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Kane Date: Tue, 10 Jul 2007 22:08:23 +0000 Subject: Re: RUN Message-Id: <46940357.8090401@inguin.com> List-Id: References: <4693ECED.9090209@inguin.com> In-Reply-To: <4693ECED.9090209@inguin.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Using the ; separator will not work. I tried adding eval, and still no luck. Putting the commands in one script is not feasible as I do not want the script to reside on the machine, instead on the thumb drive. Does that make sense? Adam Bauke Jan Douma wrote: > Adam Kane wrote on 10-07-07 22:32: >> Hi list, >> >> Is it possible to use more than one RUN+= statement in a udev line, >> or execute more than one thing? I am wanting to execute more than >> one thing upon my usb key being plugged in. >> >> Here is what I have in udev.rules >> >> BUS="scsi", SYSFS{model}="USB2FlashStorage", SYMLINK="usbdrive", >> RUN+="/bin/mount /dev/usbdrive" >> >> The RUN+ statement is mounting the drive to /media/usbdrive, as >> specified in the /etc/fstab. I would like to to also run "/bin/sh >> /media/usbdrive/test.sh" >> >> I have tried the following with no success: >> >> BUS="scsi", SYSFS{model}="USB2FlashStorage", SYMLINK="usbdrive", >> RUN+="/bin/mount /dev/usbdrive ; /bin/sh /media/usbdrive/test.sh" >> >> >> BUS="scsi", SYSFS{model}="USB2FlashStorage", SYMLINK="usbdrive", >> RUN+="/bin/mount /dev/usbdrive && /bin/sh /media/usbdrive/test.sh" >> >> >> BUS="scsi", SYSFS{model}="USB2FlashStorage", SYMLINK="usbdrive", >> RUN+="/bin/mount /dev/usbdrive", RUN+="/bin/sh /media/usbdrive/test.sh" > > Something like RUN+="eval bin/mount /dev/usbdrive"; > /media/usbdrive/test.sh"? > Or put all commands in one script and run that: > RUN+="mount_and_test.sh" > > >> Adam Kane > > bjd > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ 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