[Nut-upsuser] upssched-cmd wrong call
Kastus Shchuka
kastus at epocrates.com
Tue Oct 18 02:51:03 UTC 2005
On Thu, Sep 22, 2005 at 09:25:18PM +0200, Arnaud Quette wrote:
> 2005/9/20, Hannes Gruber <hannes at usw.at>:
> >
> > Hi,
> >
> > i am running nut-2.0.0-5 on Fedora core 3.
> >
> > I have the following Problem:
> >
> > In my upssched.conf i have set the Following Parameter:
> >
> > CMDSCRIPT /usr/local/guzman/sbin/upssched-cmd
> > ...
> > AT COMMBAD * START-TIMER upsgone 10
> > AT COMMOK * CANCEL-TIMER upsgone
> > ...
>
>
> does the PIPEFN and LOCKFN directories exists,
> and does these have the right privileges for the nut users?
>
> Arnaud
I don't know if this problem was ever solved as I do not see any more replies.
I am having the same problem but on SUSE 9.2.
I am using self-compiled NUT 2.0.2.
This is the extract from system log:
Oct 17 19:11:25 linux upsmon[4926]: UPS su1400 at kastus on battery
Oct 17 19:11:25 linux upssched[4930]: Timer daemon started
Oct 17 19:11:26 linux upssched[4930]: New timer: onbatt (90 seconds)
Oct 17 19:12:56 linux upssched[4930]: Event: onbatt
Oct 17 19:12:56 linux upssched[4930]: Execute command failure: /etc/ups/cmd onba
tt: No such file or directory
File does exist and is executable:
linux:~ # ls -l /etc/ups/cmd
-rwxr-xr-x 1 root root 125 Oct 17 19:10 /etc/ups/cmd
My upssched.conf file is this:
CMDSCRIPT /etc/ups/cmd
PIPEFN /etc/ups/upssched/pipe
LOCKFN /etc/ups/upssched/lock
AT ONBATT * START-TIMER onbatt 90
AT ONLINE * CANCEL-TIMER onbatt
The directory for PIPEFN and LOCKFN exists and is accessable by user nutmon:
drwx------ 2 nutmon root 48 Oct 17 19:22 upssched
I can also invoke /etc/ups/cmd from shell using syntax
sh -c "/etc/ups/cmd onbatt"
Any ideas what's going wrong?
Could it be something related to the differences in bash on SUSE and Debian?
This is what system(3) man page says:
system() will not, in fact, work prop‐
erly from programs with set-UID or set-GID privileges on systems on
which /bin/sh is bash version 2, since bash 2 drops privileges on
startup. (Debian uses a modified bash which does not do this when
invoked as sh.)
Thanks,
--
Kastus Shchuka
Unix System Administrator
Epocrates Inc.
tel 650.227.1786
fax 650.592.6995
More information about the Nut-upsuser
mailing list