SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Sponsored Links

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

############################################################################## #
# $RCSfile: README,v $
#
# waitclose README
# Original Author: Caskey Dickson <caskey@technocage.com> 2001-02-07 # Copyright 2001 TechnoCage, Inc. All Rights Reserved # $Id: README,v 1.8 2001/04/28 20:20:50 caskey Exp $ #
# This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. #
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. #
# You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
##############################################################################

Introduction

waitclose is a trivially simple program that is useful in scripts that need to wait for a user to insert cdroms. If the disc drive is empty it will eject it. If a disc is present it considers its work done. If the disc drive is open it will wait until it closes with a disc in it. Closing the tray without anything in it will cause it to be re-opened. For more info, run it with -h to see all the current command line options.

Comments are welcome. If you find something interesting to do with this code I'd like to hear about it. My email address is below.

USAGE

$ waitclose [-h] [-e] [device]

  e       :  Eject an empty tray (and continue doing so until a disc
             is inserted) This is the original 0.1 behavior.
  device  :  The device file of the cdrom drive.  Typical values include
             /dev/cdrom /dev/cdrom2 /dev/hdc /dev/hdd.  The default is
             /dev/cdrom.
  h       :  Display help and exit.
TODO
  • Add some command line parameters
  • A man page
Changelog

version 0.3

  • Put back the information code -d will display useful output
  • -h should shows a synopsis
  • reversed the order of the changelog version 0.2
  • Optional eject behavior using code provided by Stephen Crane version 0.1
  • First version
Authors

Caskey Dickson <caskey@techncoage.com> (Original program) Stephen Crane <jscrane@maths.tcd.ie> (getopt support,

                                           help, debug output at runtime
                                           optional eject behavior)


Sponsored Links

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.