From: Vladimir Karpinsky <vkarpinsky@mail.ru>
To: community@lists.altlinux.org
Subject: Re: [Comm] NUT и Ippon
Date: Tue, 24 Jan 2012 18:19:23 +0400
Message-ID: <4F1EBDEB.8010501@mail.ru> (raw)
In-Reply-To: <4F1C4391.4030803@kalina.in.ua>
22.01.2012 21:12, Yura Kalinichenko пишет:
> Vladimir Karpinsky пишет:
>>
>> Письма тоже не приходят. Может, кроме рута, на выполнение этого скрипта
>> надо ещё кому-нибудь права дать?
>>
> Разумеется.
>
> ls -l /usr/lib/nut/upssched-cmd
> -rwxr-xr-- 1 root upsmon 3945 Ноя 13 01:07 /usr/lib/nut/upssched-cmd
Права на скрипт и /var/run/upssched поправил, стало лучше:
Jan 24 17:34:05 pullet upsmon[17744]: UPS ippon@192.168.5.2 on battery
Jan 24 17:34:05 pullet upsmon[28478]: UPS ippon@192.168.5.2 on battery
Jan 24 17:34:09 pullet upsmon[2717]: UPS ippon@192.168.5.2 on battery
Jan 24 17:34:09 pullet wall[3623]: wall: user upsmon broadcasted 1 lines
(34 cha
rs)
Jan 24 17:34:09 pullet upssched[3714]: Timer daemon started
Jan 24 17:34:10 pullet upssched[3714]: New timer: onbattwarn (30 seconds)
Jan 24 17:34:10 pullet upssched[3714]: New timer: earlyshutdown (180 seconds)
Jan 24 17:34:40 pullet upssched[3714]: Event: onbattwarn
Jan 24 17:37:10 pullet upssched[3714]: Event: earlyshutdown
Jan 24 17:37:10 pullet upssched-cmd: UPS on battery too long, forced shutdown!
Скрипт запускается. До этого момента всё работает, рассылаются
предупредительные письма, далее он должен выполнить "/sbin/shutdown -h now"
но выключения не происходит:
Jan 24 17:37:10 pullet upssched[3714]: exec_cmd(/usr/sbin/upssched-cmd
earlyshutdown) returned 126
Опять код выхода 126, где-то что-то с правами? Если скрипт работает с
правами пользователя upsmon, он вероятно не вправе выполнить shutdown. Это
где-то настраивается, или надо использовать sudo?
Jan 24 17:37:25 pullet upssched[3714]: Timer queue empty, exiting
Файл /var/run/upssched/upssched.pipe в процессе работы создавался, а, вот,
файла /var/run/upssched/upssched.lock я не увидел. Эти файлы указаны в
uppsched.conf, как PIPEFN и LOCKFN, соответственно.
--
С уважением,
Владимир.
next prev parent reply other threads:[~2012-01-24 14:19 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-20 14:00 Vladimir Karpinsky
2012-01-20 14:07 ` Vladimir Karpinsky
2012-01-21 12:35 ` Sergey Vlasov
2012-01-21 13:05 ` Vladimir Karpinsky
2012-01-21 16:07 ` Sergey Vlasov
2012-01-21 18:29 ` Dubrovskiy Viacheslav
2012-01-21 18:47 ` Vladimir Karpinsky
2012-01-21 18:38 ` Vladimir Karpinsky
2012-01-22 17:18 ` Michael Shigorin
2012-01-22 17:28 ` Vladimir Karpinsky
2012-01-22 17:51 ` Michael Shigorin
2012-01-22 17:59 ` Vladimir Karpinsky
2012-01-22 21:04 ` Yura Kalinichenko
2012-01-22 16:12 ` Vladimir Karpinsky
2012-01-22 17:12 ` Yura Kalinichenko
2012-01-22 17:23 ` Vladimir Karpinsky
2012-01-24 14:19 ` Vladimir Karpinsky [this message]
2012-01-24 14:37 ` Шенцев Алексей Владимирович
2012-01-24 14:51 ` Vladimir Karpinsky
2012-01-24 15:00 ` Шенцев Алексей Владимирович
2012-01-24 15:21 ` Vladimir Karpinsky
2012-01-24 15:31 ` Шенцев Алексей Владимирович
2012-01-24 15:39 ` Vladimir Karpinsky
2012-01-24 15:51 ` Шенцев Алексей Владимирович
2012-01-24 16:01 ` Vladimir Karpinsky
2012-01-24 19:48 ` Sergey Vlasov
2012-01-25 15:50 ` Vladimir Karpinsky
2012-01-25 20:50 ` Alexey Borisenkov
2012-01-26 5:27 ` Vladimir Karpinsky
2012-01-24 19:04 ` Andrey Liakhovets
2012-01-24 19:13 ` Vladimir Karpinsky
2012-02-01 13:18 ` Vladimir Karpinsky
2012-02-01 16:17 ` Vladimir Karpinsky
2012-02-02 15:24 ` Vladimir Karpinsky
2012-02-01 17:01 ` Andrey Liakhovets
2012-02-01 17:32 ` Vladimir Karpinsky
2012-02-01 18:06 ` Andrey Liakhovets
2012-02-01 18:11 ` Vladimir Karpinsky
2012-01-22 17:37 ` Dubrovskiy Viacheslav
2012-01-21 12:23 ` Sergey Vlasov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F1EBDEB.8010501@mail.ru \
--to=vkarpinsky@mail.ru \
--cc=community@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git