From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Jenkins Date: Mon, 15 Sep 2008 09:08:37 +0000 Subject: Re: Alter a sysfs attribute?? Message-Id: <48CE2615.4090302@tuffmail.co.uk> List-Id: References: <571445d80809141048m5b06d3d9j734ec46c4a50fbfd@mail.gmail.com> In-Reply-To: <571445d80809141048m5b06d3d9j734ec46c4a50fbfd@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Jay Otis wrote: > Hello all, I am using Ubuntu Hardy and I need to change the > "max_sectors" attribute of my usb device on boot but RUN+="/bin/echo > 1024 > /sys/block/%k/device/max_sectors" does not seem to change the > value. I've tried su -... and su username -c... the command runs from > a root terminal and from a startup script in init.d just not from udev > :s Redirection is a shell function. udev does not automatically run commands through a shell. Try RUN+="/bin/sh -c echo 1024 > /sys/block/%k/device/max_sectors" Regards Alan