My enclosure does not use the Slot XX naming. From what I can see this is set by the manufacturer in firmware and is not fixed.
Also I made the script more reusable by making a main() function and using the name == 'main' methodology. This way someone can borrow from the code or you can use python from the shell and import from the script without having things execute immediately. I used this technique for debugging actually.
My enclosure does not use the Slot XX naming. From what I can see this is set by the manufacturer in firmware and is not fixed.
Also I made the script more reusable by making a main() function and using the name == 'main' methodology. This way someone can borrow from the code or you can use python from the shell and import from the script without having things execute immediately. I used this technique for debugging actually.
Finding this script saved me a bunch of time writing my own!
Thanks, -Alan