lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Forgive a brief lapse into /bin/bash, but I have kludged a script
called "spindown-device" that fully quietens an hotplug-capable
device.  Yan Li (mentioned below) wrote the original.

The script is GPL3.

I'll just post the first dozen lines or so here, and will send
more if the list gives its approval.

It uses (GNU/Linux?) sg3_utils to manipulate the low SCSI layer,
and also udevadm ("udevadm settle") [? from systemd?] to also
flush udev actions.


cheers, b.

--- (cut here) ---

#  spindown-device: an easy-to-use script to properly put an USB
#  device into suspend mode that can then be unplugged safely
#  (Originally named suspend-usb-device.)
#  Copyright (C) 2009, Yan Li <>
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.