From: Sergey <a_s_y@sama.ru> To: sisyphus@altlinux.ru Subject: Re: [sisyphus] apcupsd - Killpower Date: Fri, 28 Nov 2003 11:57:25 +0400 Message-ID: <200311281157.25601.a_s_y@sama.ru> (raw) In-Reply-To: <96180778475.20031128102308@amfitel.ru> On Friday 28 November 2003 11:23, Nicholas Tretyachenko wrote: > В результате тестирования apcupsd выявились следующие проблемы: > 1) Если /usr и /var находятся на отдельных файловых системах, > при выполнении shutdown apccontrol не может разослать сообщение > пользователям с помощью wall (скрипт /etc/apccontrol, строка 61 ), > поскольку к этому моменту /usr размонтирован. Попытка записи в > /var/lib/apcupsd/apcupsd.events также приводит к ошибке. Хм. РАзьве он это все делает не до того, как шатдаун начать ? Что-то я ни разу такой проблемы не замечал... > Версия apcupsd - 3.0.15 А не старовата ? А то оно 3.10.8 последнее. А вообще, там еще скрипты полезно переделать, на мой взгляд. С таким набором всяких разных ковыряться неудобно. Проще примерно так: ==== upsdmessages #!/bin/sh # # This shell script if placed in /etc/apcupsd # will be called by /etc/apcupsd/apccontrol via # symlinks generated by makesymlinks script # when the UPS goes on batteries. # We send an email message to root to notify him. # # It's need of "sed" ! # SYSADMIN=root MAIL="mail" HOSTNAME=`hostname` COLOR="" NAME=`echo $0 | sed 's|^.*/||'` case $NAME in onbattery) MSG="$HOSTNAME Power Failure !!!" ;; mainsback) MSG="$HOSTNAME Power has returned" ;; commok) MSG="$HOSTNAME Serial port communications with UPS restored" ;; commfailure) MSG="$HOSTNAME Serial port communications with UPS lost" ;; changeme) MSG="$HOSTNAME UPS battery needs changing NOW." ;; masterconnect) MSG="slave $HOSTNAME received connection from master" ;; mastertimeout) MSG="slave $HOSTNAME lost contact with master" ;; upsdmessages) MSG="$HOSTNAME test upsdmessages." ;; *) MSG="$HOSTNAME unknown excecute upsdmessages." esac # ( echo "$MSG" echo " " /sbin/apcaccess status ) | $MAIL -s "$MSG" $SYSADMIN exit 0 ==== ==== changescripts # # This script if placed in /etc/apcupsd # will be called only once manualy for generate # symlinks to upsdmessages script # This symlinks will be called by /etc/apcupsd/apccontrol # when the UPS goes on batteries. # rm -f changeme rm -f commfailure rm -f commok rm -f mainsback rm -f onbattery rm -f mastertimeout rm -f masterconnect ln -s upsdmessages changeme ln -s upsdmessages commfailure ln -s upsdmessages commok ln -s upsdmessages mainsback ln -s upsdmessages onbattery ln -s upsdmessages mastertimeout ln -s upsdmessages masterconnect ==== -- С уважением, Сергей a_s_y@sama.ru
next prev parent reply other threads:[~2003-11-28 7:57 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-11-28 7:23 Nicholas Tretyachenko 2003-11-28 7:57 ` Sergey [this message] 2003-11-28 8:14 ` Re[2]: " Nicholas Tretyachenko 2003-11-28 9:00 ` Sergey 2003-11-28 9:21 ` Re[2]: " Nicholas Tretyachenko 2003-11-28 8:07 ` Valery V. Inozemtsev 2003-11-28 8:18 ` Re[2]: " Nicholas Tretyachenko 2003-11-28 9:08 ` Sergey 2003-11-28 8:55 ` Sergey Vlasov 2003-11-28 9:17 ` Sergey 2003-11-28 9:19 ` Re[2]: " Nicholas Tretyachenko
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=200311281157.25601.a_s_y@sama.ru \ --to=a_s_y@sama.ru \ --cc=sisyphus@altlinux.ru \ /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 Sisyphus discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \ sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru public-inbox-index sisyphus Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.sisyphus AGPL code for this site: git clone https://public-inbox.org/public-inbox.git