LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-09-2008, 11:08 PM   #1
HighLife
Member
 
Registered: Feb 2003
Posts: 36

Rep: Reputation: 15
/sbin/halt called by ups monitoring software doesnt work?


I have a new UPS with Net Agent II SNMP.

The UPS monitoring software that comes bundled with the package is called Clientmate. I've installed the windows version on a WinXP machine and it initiates a shutdown fine when the AC power is cut. I've installed the Linux version on a Centos 5 system and it can see the SNMP enabled UPS, it senses when the AC power is cut and initiates the shutdown correctly after the predefined delay period, but when it issues the /sbin/halt command nothing happens?

If I have a shell open I see a countdown until shutdown happening, when it gets to 0 it reads:

# Preshutdown processes all done! (time/date stamp)
# Shutdown NOW! /sbin/halt (time/date stamp)

...and then it just sits there not shutting down?

If I issue /sbin/halt manually from the command line it shuts down immediately?

I tried changing the path to /sbin/halt in the clientmate config file to /usr/sbin/halt but it didnt appear to effect anything.

Any suggestions as to why /sbin/halt is not working when called by the Clientmate software. I am thinking possibly the Clientmate may not be running under root but I am not sure how to check? I installed it using root user and all files are owned by root?
 
Old 06-11-2008, 08:45 AM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
Clientmate runs as a daemon, you have to give it 'sudo' permissions to execute '/sbin/halt'.

So far as I know, it is relatively easy to setup, do a search here on giving users specific sudo permissions, you'll turn up a pile of things!
 
Old 06-11-2008, 08:50 PM   #3
HighLife
Member
 
Registered: Feb 2003
Posts: 36

Original Poster
Rep: Reputation: 15
Cheers, I got it working using sudo as per your advice. I first tried just allowing "deamon" group to execute /etc/halt but it didnt work, so I allowed "users" and it now works but I'd prefer to lock it down a bit better I just dont what specific group or user the Clientmate stuff runs under?

I'll try and dig a little deeper.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/sbin/init is not called by the kernel raklo Linux - Hardware 2 09-19-2006 05:31 AM
Why doesnt my USB mouse doesnt work? barkha Linux - Hardware 2 08-16-2005 11:31 AM
UPS cable didn't work. A cool work-around jlangelier LinuxQuestions.org Member Success Stories 1 07-18-2003 05:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration