ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: therion <therion@pochta.ru>
To: community@altlinux.ru
Subject: Re: [Comm] bash script - eject
Date: Wed, 22 Oct 2003 09:14:10 +0600
Message-ID: <200310220914.10682.therion@pochta.ru> (raw)
In-Reply-To: <200310211254.h9LCsLX02615@real.localdomain>

В сообщении от 21 Октябрь 2003 18:54 Dmitry Belyayev написал(a):

> #!/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
> ) & 
Если так ставить выдается сообщение типа: line 7: [: ==: unary operator expected, поскольку команда eject сама размонтирует устройство, достаточно просто 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 mailing list
> Community@altlinux.ru
> http://www.altlinux.ru/mailman/listinfo/community

  reply	other threads:[~2003-10-22  3:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-20  8:47 Петричев Роман
2003-10-20 10:13 ` Evgeniy Kobzev
2003-10-20 10:23   ` Leonid B. Sysoletin
2003-10-21 12:54     ` Dmitry Belyayev
2003-10-22  3:14       ` therion [this message]
2003-10-20 13:09 ` [Comm] NAT Oleg Frolkov
2003-10-20 13:11   ` Pavel S. Khmelinsky
2003-10-20 13:14   ` Andriy Dobrovol's'kii
2003-10-20 13:35     ` [Comm] via8233 KO(c)Tik
2003-10-20 19:38       ` Canis Cerberus
2003-10-21  3:22       ` Andrey Rahmatullin
2003-10-23  8:35         ` [Comm] via8233 Michael Shigorin
2003-10-21  6:18       ` [Comm] via8233 Maxim.Savrilov
2003-10-21  7:36       ` georginus
2003-10-21  8:53         ` Re[2]: " KO(c)Tik
2003-10-21 10:59         ` cka3o4nuk
2003-10-21 18:40           ` Andrey Novoselov
2003-10-20 13:34   ` [Comm] NAT Dmitriy Shcherbakov
2003-10-20 15:25 ` [Comm] bash script - eject Andrei Lomov
2003-10-20 18:36 ` [Comm] NAT Oleg Frolkov
2003-10-21  8:58 ` [Comm] bash script - eject A.L. Klyutchenya

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=200310220914.10682.therion@pochta.ru \
    --to=therion@pochta.ru \
    --cc=community@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 Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git