[Comm] bash script - eject

Dmitry Belyayev =?iso-8859-1?q?reset_=CE=C1_makeevka=2Enet?=
Вт Окт 21 16:54:21 MSD 2003


#!/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



Подробная информация о списке рассылки community