Results 1 to 2 of 2
All Gurus
I am very new to Linux and im trying to setup an automatic shut down for our linux boxes via our UPS (if there’s a power outage). The ...
- 11-21-2008 #1Just Joined!
- Join Date
- Nov 2008
- Posts
- 2
Newbie Linux scripting question
All Gurus
I am very new to Linux and im trying to setup an automatic shut down for our linux boxes via our UPS (if there’s a power outage). The UPS only allows a batch file to be run so ive come up with this idea...
I’ve come across plink to allow me to run the Linux command in a batch file:
plink 10.10.60.30 -l root -pw <password> -ssh /nas/sbin/nas_halt now
This works fine but after this command it prompts for a yes. Nas_halt command has no auto setting to input yes so it just sits there waiting for input.
Is there any way I could set this up? e.g getting plink to call a Linux script which calls nas_halt and inputs the yes after?? If so what would this be?
Any help would be superb.
Cheers
Baker0
- 11-22-2008 #2
baker0, this question would get better attention at this section of the forum. Its a little too advanced for the newbie section. Mark it as solved and open a new thread here Linux Programming & Scripting - Linux Forums
Linux Registered User # 475019
Lead,Follow, or get the heck out of the way
AntiX,Puppy,Ubuntu,Windows 7=(cuz of scooters)
Open CourseWare for Linux Geeks


Reply With Quote