James G. Sack (jim) wrote: > David Brown wrote: >>.. On Mon, Dec 17, 2007 at 07:06:47AM -0800, George Geller wrote: >>>> David Brown said: >>>> Does it recover from sleep? >>> If you would read the links I posted, you'll get the whole story. It is >>> too much to reproduce here. >>> >>> http://wsms.wikiplanet.com/mediawiki/index.php/FreeAgent >> I did read the posts. My question was did _you_ get it to work. The >> posting gives several hacks, none of which are very satisfying ways of >> managing a device. >> > > I thought the udev solution was not unreasonable. I plan on implementing > that one if it tests out ok. > > The unsatisfying part is that plugging it into a new box re-creates the > sleeping-sickness scenario. > > The question I want to ask is why isn't the "allow_restart" setting (as > the Linux kernel calls it) the default? >
OK, the recipe based on posts to http://ubuntuforums.org/showthread.php?t=494673 seems to work ok for me. ------------------------------------------------------------------- ls -o /etc/udev/rules.d/85-usbhd_allow_restart.rules -rw-r--r-- 1 root 145 ... /etc/udev/rules.d/85-usbhd_allow_restart.rules ------------------------------------------------------------------- cat /etc/udev/rules.d/85-usbhd_allow_restart.rules BUS=="scsi", KERNEL=="sd?", \ SYSFS{vendor}=="Seagate", SYSFS{model}=="FreeAgentDesktop", \ RUN+="/usr/local/bin/usbhd_allow_restart %k" ------------------------------------------------------------------- ls -o /usr/local/bin/usbhd_allow_restart -rwxr-xr-x 1 root 236 ... /usr/local/bin/usbhd_allow_restart ------------------------------------------------------------------- cat /usr/local/bin/usbhd_allow_restart #!/bin/bash # assert called by /etc/udev/rules.d/85-usbhd_allow_restart.rules # assert only called upon attachment of Seagate FreeAgent drive # assert $1 is (eg) sdc echo 1 > /sys/block/$1/device/scsi_disk:*/allow_restart #===eof=== ------------------------------------------------------------------- This works, although a puzzle to me is why it seems necessary to use /bin/bash rather than /bin/sh in the script -- otherwise the echo command fails. <sigh>. Regards, ..jim -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
