as far as i can tell from a quick google search, the script should work as is in ubuntu 12.10
if not then ill see what i can do but make sure to only run it when the phone ISNT connecting properly, if you use it when the phone IS connected properly the thing might mess up your configuration, and you have to be in the mode you want to fix connection for obviously, you cant fix a fastboot connection while in adb mode
The thing is, I think it is connected properly. fastboot devices provides a serial number.

