Hello Spikes,
Yes there is. You will need to use the root account on those computers, and it could be a security issue if you don't properly protect the script file, but there is a way.
On the computer with the UPS connection, you will need to write a script that will contact the other computers, and down them for you.
I would use the EXPECT script language which will allow you to use telnet/ssh (I prefer ssh), and from there, in psuedo code:
send "ssh -l root box1name\r"
expect "password"
send "the root password\r"
expect "prompt#"
send "shutdown -h now\r"
expect "prompt#"
send "exit\r"
expect "prompt"
Notes:
1) Expect might not be installed. Go install it.
2) If you do not lock the file properly (root read permissions only!), it is a security leak with the root password in there
3) shutdown -h now will bring the box down right then and there. Do a man shutdown and see if you can give the users a few minutes to logoff properly
4) The \r in the script is a return character. Need it for syntax reasons. Do a man expect to get the rest of the syntax. I would copy some code for you if I had a shell access to my box.
5) Test it when you are standing in front of the system to make sure the commands propogate properly
6) Make sure your network hubs are on the UPS. If the hub is already out of power, no telnet / ssh will work to reach the other boxes.
7) If you change the root password, you will need to update your scripts. Same if you change IP numbers / DNS names.
Good Luck.
Christian
Reputation Points: 121
Solved Threads: 57
Posting Virtuoso
Offline 1,629 posts
since Mar 2004