Hi all,
The place where i stay experiences lot of power cuts and my solaris box is almost always on.
It so happens that many times i will not be around to switch it off as soon as there is a power cut..(i also have UPS which provides alternative supply for 15min)
So i wanted to write a script that can actually sense a power cut ,or at least sense that the power is being supplied from UPS and then automatically switch off....
I would like to try and write a script myself ,but dont know where i should start looking for the changes in the parameters when there is a power cut?
So could you please let me know where i can get these informations from and how i can use it in a script to initiate a shutdown?
Just a brief overview is sufficient ,as i would like to try writing a script myself...
If i cannot i will revert back!!!!
Thanks