From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-Id: <200310211254.h9LCsLX02615@real.localdomain> Content-Type: text/plain; charset="koi8-r" From: Dmitry Belyayev To: community@altlinux.ru Subject: Re: [Comm] bash script - eject Date: Tue, 21 Oct 2003 15:54:21 +0300 X-Mailer: KMail [version 1.3.1] References: <38853857.20031020124711@orel.mts.ru> <3F93B53D.3020803@diamonds.ru> <200310201423.23112.webmaster@unicon-ms.ru> In-Reply-To: <200310201423.23112.webmaster@unicon-ms.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.1.2 Precedence: list Reply-To: community@altlinux.ru List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2003 12:55:59 -0000 X-List-Received-Date: Tue, 21 Oct 2003 12:55:59 -0000 Archived-At: List-Archive: List-Post: #!/bin/sh TMPFILE="/var/cdd/cdd.tmp" CDD=`cat $TMPFILE` if [ $CDD == "closed" ]; then ( umount /mnt/cdrom >/dev/null 2>/dev/null ; eject >/dev/null 2>/dev/null ) & echo opened > $TMPFILE else ( eject -t >/dev/null 2>/dev/null ; mount /mnt/cdrom >/dev/null 2>/dev/null ) & echo closed > $TMPFILE fi