From owner-FreeBSD-users-jp@jp.freebsd.org  Sat Oct 16 19:02:58 1999
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id TAA89165;
	Sat, 16 Oct 1999 19:02:58 +0900 (JST)
	(envelope-from owner-FreeBSD-users-jp@jp.FreeBSD.org)
Received: from aya.or.jp (mail.aya.or.jp [210.233.113.12])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id TAA89160
	for <FreeBSD-users-jp@jp.freebsd.org>; Sat, 16 Oct 1999 19:02:58 +0900 (JST)
	(envelope-from ganden@aya.or.jp)
Received: from aya.or.jp (tc225.aya.or.jp [210.233.113.225])
	by aya.or.jp (8.9.3/3.7W) with ESMTP id TAA06652
	for <FreeBSD-users-jp@jp.freebsd.org>; Sat, 16 Oct 1999 19:05:04 +0900 (JST)
Message-ID: <38084C5C.3C673829@aya.or.jp>
Date: Sat, 16 Oct 1999 18:58:52 +0900
From: Tsukumo <ganden@aya.or.jp>
X-Mailer: Mozilla 4.5 [ja] (Win98; I)
X-Accept-Language: ja
MIME-Version: 1.0
To: FreeBSD-users-jp@jp.freebsd.org
References: <3800BC61.6FCACEBC@gonzo.co.jp>
			<19991011030917N.inagaki@tg.rim.or.jp>
			<3802900F.C4A8DF8C@gonzo.co.jp> <19991014221713N.inagaki@tg.rim.or.jp> <38069D21.D7085BF0@gonzo.co.jp>
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Reply-To: FreeBSD-users-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+990727
X-Sequence: FreeBSD-users-jp 46675
Subject: [FreeBSD-users-jp 46675] echo -e "\377" > /dev/cua3
 =?ISO-2022-JP?B?GyRCJE4wVUwjGyhC?= 
Errors-To: owner-FreeBSD-users-jp@jp.freebsd.org
Sender: owner-FreeBSD-users-jp@jp.freebsd.org
X-Originator: ganden@aya.or.jp

$B6e==6e$H?=$7$^$9!#(B

UPS$B$K$D$$$F65$($F2<$5$$!#(B
$B0J2<$N(BURL$B$N(BUPS-HOWTO$B$rFI$s$@$N$G$9$,!"(B
$BNI$/M}2r$G$-$J$$$H$3$m$,$"$j$^$9!#(B
$B$b$7J,$+$kJ}$,$$$i$C$7$c$$$^$7$?$i65$($F2<$5$$!#(B
$B$I$&$>$*4j$$$7$^$9!#(B

http://www.gee.kyoto-u.ac.jp/LDP/HOWTO/UPS-HOWTO-8.html

$B!Z<ALd#1![(B
2$B9TL\$N#T(BX signal$B$H$O2?$J$N$G$7$g$&$+!)(B
$B$?$V$s%[%9%H$+$i=P$?(BUPS$B$rDd;_$5$;$k?.9f$@$H;W$$$^$9$,!"(B
$B$J$<(BTX signal$B$H8F$P$l$k$N$G$7$g$&$+!)(B
$B$b$7$4B8CN$NJ}$,$$$i$C$7$c$$$^$7$?$i65$($F2<$5$$!#(B

$B!Z<ALd#2![(B
OS$B$OL5;v$K%7%c%C%H%@%&%s$5$l$F!"(B
11$B9TL\$G(B"Turning off UPS. Bye"$B$H%a%C%;!<%8$r=P$7$F!"(B
13$B9TL\$G(BTX signal$B$H$7$F(B"\377"$B$r(BCOM3$B$K=P$7$F$$$k$H;W$$$^$9!#(B
$B$I$&$7$F(BTX signal$B$r(B"\377"$B$HI=8=$G$-$k$N$G$7$g$&$+!)(B
$B$b$7J,$+$kJ}$,$$$i$C$7$c$$$^$7$?$i!"$I$&$>65$($F2<$5$$!#(B
 
 1:The system shutdown script
 
 2:When system shutdown is complete, we can turn off the UPS raising the
TX signal of the serial port for over 1ms.
 3:The serial device si already properly configured( see the stty
command in the rc.local script).
 4:If the file /etc/turnUPSoff is present, we send the byte 0xff(all '1'
) to the serial port.
 
 5:To do this, add the following lines near the bottom of your system
shutdown script( /etc/rc.d/rc.0 in my case ).
 6:The proper place depends on the way your system is configured, but it
should be okay to insert the lines 
 7:before the echo command which prints the "System is halted" message.
 
 8:/etc/rc.d/rc.0
 9:# Is this a powefail situation?
10:if [ -f /etc/turnUPSoff ]; then
11:    echo "Turning off UPS. Bye."
12:    sleep 5
13:    echo -e "\377" > /dev/cua3
14:    exit 1
15:fi

$B0J>e$G$9$,!"$I$&$>$*4j$$CW$7$^$9!#(B
