Page 1 of 1

Debian package: ultrabay-scripts

Posted: Thu May 02, 2013 4:33 pm
by rumbero
Hi,

based on thinkwiki.org/wiki/How_to_hotswap_Ultrabay_devices and mainly for scratching my own itch in the absence of any known alternative, i have remixed the code from the above mentioned site and created my own set of scripts and created a Debian package from it:

------- snip -------
Package: ultrabay-scripts
Status: install ok installed
Priority: extra
Section: admin
Installed-Size: 69
Maintainer: Paul Seelig <wmlive@users.sf.net>
Architecture: all
Version: 0.4-1
Conffiles:
/etc/default/ultrabay-scripts dab9a4a81cfcf1b4f3614822ee088ee4
/etc/init.d/ultrabay-scripts 51377300835bd70b872b6d74bb05b77d
Description: Management of ThinkPad UltraBay devices and batteries
Scripts to automatically dock/undock UltraBay devices of ThinkPads via
udev rules. Also includes a script to switch discharge order to first
drain the main battery in case an UltraBay battery has been inserted.
Homepage: http://sourceforge.net/projects/wmlive/ ... ay-scripts
------- snip -------

You can find the source and Debian package at the above mentioned site.

I hope i have not reinvented the wheel while being ignorant about already existing and potentially better solutions?

Please evaluate and help to enhance it, if such functionality is of interest for you. Also, if you don't like the code, please feel free to rewrite it in a more suitable fashion.

I have only verified that it works on my own T60 and T61 Thinkpads, and would like to know if it also works with other models. So any feedback is welcome.

Thanks,
Paul

Re: Debian package: ultrabay-scripts

Posted: Tue May 07, 2013 8:59 am
by rumbero
Hi again,

in the absence of any feedback so far, just a short update:

Three revisions have been uploaded in the meantime and can be downloades by interested peple from

sourceforge.net/projects/wmlive/files/ultrabay-scripts

Here are the most noteworthy changes so far:

Code: Select all

  * Removed the rather dangerous umount procedure from ultrabay_eject.
    Better leave that to a human sysadmin to manage.

  * Added a check in ultrabay_eject, verifying if the device is still in
    use and quit with an informative error message if it's still busy.

  * Modified messages in ultrabay_eject, while at the same time getting
    rid of superfluous duplicate desktop notifications.

  * Override debhelper to only create start links with update-rc.d for
    init script, as a stop is never required.
While it seems to work fine for me, my testing perspective is limited to the T60/61 Thinpad generation. If therefore some kind soul would ve so nice as to check if it also works on older and more modern machines, and give me some feedback about success/failure, i would be more than happy to enhance the whole package based on any useful information.

BTW, since this is all based on the below cited Thinkwiki article, it would be great if someone with write access on Thinkwiki would update that particular article with a note regarding that Debian package.

Thanks a lot in advance!

Re: Debian package: ultrabay-scripts

Posted: Fri May 10, 2013 4:15 pm
by rumbero
Parallel to the release of ultrabay-scripts version 0.10-1 there is now an apt repository to save interested parties from the hassle of manual download and installation.

The key with which this repository is signed is available for download here: wmlive.sourceforge.net/wmlive/wmlive.key

Once the key has been downloaded, add it to your apt keyring like this:

Code: Select all

    sudo apt-key add ./wmlive.key
Alternatively, the key can also be directly added by using this command:

Code: Select all

    wget -O - http://wmlive.sourceforge.net/wmlive/wmlive.key | sudo apt-key add -
To include this repository, add the following line to /etc/apt/sources.list

Code: Select all

    deb http://wmlive.sourceforge.net/wmlive wheezy main
After having run 'apt-get update', you can install the package(s) included in this repository as usual.

Re: Debian package: ultrabay-scripts

Posted: Wed Dec 16, 2015 2:26 pm
by rumbero
I have recently created a github project from the ultrabay-scripts here:

https://github.com/wmlive/ultrabay-scripts

Please have a look and possibly try to enhance it if you find some gap.

Up to date ready made packages for Debian can be fetched from here:

http://wmlive.rumbero.org/repo/

Latest version is currently 0.24-1, as of writing these lines.

I would like to hear back from users if these scripts work for them as expected.