From owner-FreeBSD-users-jp@jp.freebsd.org  Sun Oct 17 13:06:36 1999
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id NAA44884;
	Sun, 17 Oct 1999 13:06:36 +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 NAA44879
	for <FreeBSD-users-jp@jp.freebsd.org>; Sun, 17 Oct 1999 13:06:35 +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 NAA27165
	for <FreeBSD-users-jp@jp.freebsd.org>; Sun, 17 Oct 1999 13:08:47 +0900 (JST)
Message-ID: <38094A59.1B3A3B02@aya.or.jp>
Date: Sun, 17 Oct 1999 13:02:33 +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: <199910161014.TAA03244@edge.sky.yamashina.kyoto.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 46693
Subject: [FreeBSD-users-jp 46693] Re: 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

$B?@8M$5$s!"2sEz$r$I$&$b$"$j$,$H$&$4$6$$$^$9!#(B

$B$7$+$7;d$b(BRS232C$B$N4pAC$OD4$Y$F$+$i<ALd$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$^$;$s$,!":#$9$0$O(B
> $B=P$FMh$^$;$s!#(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
