AminetAminet
Search:
84504 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/batch/TestDevice.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Does an IF EXISTS. Suppresses requester.
Author:wbow at crl.com (Will Bow)
Uploader:colin cts com
Type:util/batch
Architecture:m68k-amigaos
Date:1995-06-17
Download:http://aminet.net/util/batch/TestDevice.lha - View contents
Readme:http://aminet.net/util/batch/TestDevice.readme
Downloads:337

       ______          __  ____            _         
      /_  __/__  _____/ /_/ __ \___ _   __(_)_______ 
       / / / _ \/ ___/ __/ / / / _ \ | / / / ___/ _ \
      / / /  __(__  ) /_/ /_/ /  __/ |/ / / /__/  __/
     /_/  \___/____/\__/_____/\___/|___/_/\___/\___/ 
                                                 
                    __
                    | |__ _  _ 
                    | '_ \ || |
                    |_.__/\_, |
                          |__/ 

  ___  ___ _____ _   _   ___       __ _                       
 | _ )/ _ \_   _| |_| | / __| ___ / _| |___ __ ____ _ _ _ ___ 
 | _ \ (_) || | |  _  | \__ \/ _ \  _|  _\ V  V / _` | '_/ -_)
 |___/\___/ |_| |_| |_| |___/\___/_|  \__|\_/\_/\__,_|_| \___|
                                                              

 Distribution: Freeware, freely distributable


 Requirements: WB2.x and up
               Might work on 1.3 (not tested)


 Description:

     Performs an "If Exists" on a device or device:filename. If the device
     or filename does not exist, the resultant system requester will
     be suppressed.

     Returns a Zero if the device:file exists and a Five (Warn) if the
     device:file does not exist. 

     Source, written in C, is available upon request.


 Usage from a DOS Script or the shell:

     testdevice device:[filename]


 Example:

     Assume your script wants to find out if a certain device has been 
     mounted. Normally you would issue an If Exists like this:

          If Exists NET:
               ::
               ::
          Endif

     If NET: exists, the system returns a Zero and the script continues.
     If NET: does not exist, a system requester will pop up, informing 
     the user that NET: is not mounted, and the script stops until the
     requester is cleared with a mouse click.

     Testdevice does the same thing, but will not stop the script with 
     a system requester if the device does not exist.

          testdevice NET:
          If Warn
          ; failed. NET: does not exist 
            ::
            ::
          Else
          ; suceeded. NET: is mounted.
            ::
            ::
          EndIf

     You may include a filename to test like this:

          testdevice NET:node.rinfo

     You may use testdevice to see if a floppy disk is physically 
     inserted into a floppy drive. Testdevice df0: will return a
     five if a diskette is not in the drive. 

     Testdevice may be renamed. Volumes may be tested as well.


 History
     
     This file was written to overcome problems when starting ParNFS on 
     a remote, unattended A600T. Since no operator was present to 
     clear a system requester, a way had to be found to test the existance 
     of a device without the possibility of bringing the script to a 
     halt.

 
 Installation:

     Copy testdevice to any place in the path.


 Authors:      wbow at crl.com   colin at cts.com
               Will Bow       Colin Thompson


Contents of util/batch/TestDevice.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 3372    5980  56.4% -lh5- 13c1 Jun 16  1995 TestDevice/TestDevice
[generic]                 1249    3087  40.5% -lh5- 58b4 Jun 16  1995 TestDevice/TestDevice.readme
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         2 files    4621    9067  51.0%            Jun 17  1995

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>