SLUG Mailing List Archives
Re: [SLUG] Bash scripting question
- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] Bash scripting question
- From: Daniel Pittman <daniel@xxxxxxxxxxxx>
- Date: Fri, 28 Nov 2008 11:49:45 +1100
- Organization: I know I put it down here, somewhere.
- User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (gnu/linux)
Max <maxw@xxxxxxxxxxxxx> writes:
> Thanks Amos for the help. The key has no passphrase, I'll try for
> verbosity on pssh. Its as if the script is not carrying the user
> profile (root, necessary as it's a shutdown command to be triggered
> when UPS battery gets low)
I am not certain what you mean by "not carrying the user profile", but
you /could/ mean that you expect the normal .profile, environment
variables and other ephemera of an interactive login to be preserved.
cron runs commends in a very limited environment without trying to
preserve the environment or anything like that.
This can cause confusion when $PATH, $HOME and a few other variables are
It is unlikely, though, to cause a passwordless key to stop
functioning. It might, though, interact with the pssh tool...
> This is a workaround since I can't put apcupsd on the various linuxes
> under my care. Dependancy nightmares with Suse 10, Centos and
Personally, when it came to dealing with UPS data over the network
I always found the NUT (Network UPS Tools) project to be a wonderful
choice. It has very broad support (including APC) for hardware, and is
well designed and portable.
You may find that migrating to that from apcupsd will make your life
easier and happier, without needing to fiddle with cron stuff.