X-Nupop-Charset: English
Newsgroups: bit.listserv.aix-l
Date:         Fri, 8 Jan 1993 09:56:45 EST
Reply-To:     rparry@hydrolab.arsusda.gov
Comments:     Warning -- original Sender: tag was rparry@[192.94.164.100]
From:         Rob Parry <rparry@HYDROLAB.ARSUSDA.GOV>
Subject:      RE: Help for reading data from CD-ROM on RS6k !

In Message Fri, 8 Jan 1993 21:57:34 GMT, u312011@TWNCU865.NCU.EDU.TW writes:

>Dear All Experts :
>
>     I got one databank on a CD-ROM for my program on RS6k. How could I use
>  command to use CD-ROM like 2mb floppy disk on RS6k ? Do I unmount InfoExploer
>  the disc from the system ? All I want to do is list the data of the databank,
>  and get one file from it.
>
>     Thanks in advance !
>
>
>     Albert Tseng
>     u312011@twncu865.ncu.edu.tw
>     Dpt. of Chemical Eng., NCU, Taiwan.
>     -----------------------------------

I recently did this.  Thru SMIT I made an entry in in /etc/filesystems to
mount the CD-ROM at /cdrom   Then I wrote 3 shell scripts to mount &
unmout the CD-ROM because we have a number of scientists who use the CD-ROM
for data and I wanted to make it as painless as possible.  I had to set the
write bit for other users on for /cdrom inorder for non-root users to mount
the CD-ROM to it.  I also did the same for the InfoExplorer mount point
(I don't remember the directory off the top of my head).

The 3 scripts are:
   mount-cdrom    -- mounts a DATA CD-ROM
   mount-info     -- mounts the InfoExplorer CD_ROM
   umount-cdrom   -- unmounts a CD-ROM

Hope this helps.

**** mount-cdrom
#
# Shell script to mount the CD-ROM currently in the caddy
#
cdtest=`mount | grep cd0`
echo
echo Preparing to mount the CD-ROM.
echo
mount
if [ "x$cdtest" != "x" ]
then
 echo
 echo CD-ROM is already mounted. Perhaps you want to unmount the CD-ROM.
 echo Do this using: umount-cdrom
 echo
else
 echo
 echo CD-ROM is not presently mounted.
 echo Put the CD Cartridge into the CD player. Hit \<Enter\> to continue.
 read AnyKey
 mount -r -v cdrfs /dev/cd0 /cdrom
 echo
 echo Mount sucessful.
 echo
 mount
fi


*** mount-info
#
# Shell script to mount the InfoExplorer CD-ROM currently in the caddy
#
cdtest=`mount | grep cd0`
echo
echo Preparing to mount the InfoExplorer CD-ROM.
echo
mount
if [ "x$cdtest" != "x" ]
then
 echo
 echo CD-ROM is already mounted. Perhaps you want to unmount the CD-ROM.
 echo Do this using: umount-cdrom
 echo
else
 echo
 echo CD-ROM is not presently mounted.
 echo Put the InfoExplorer CD into the CD player. Hit \<Enter\> to continue.
 read AnyKey
 mount -v cdrfs -r /dev/cd0 /usr/lpp/info/En_US
 echo
 echo Mount sucessful.
 echo
 mount
fi


*** umount-cdrom
#
# Shell script to unmount the CD-ROM currently in the CD-ROM reader
#
cdtest=`mount | grep cd0`
echo
echo Preparing to unmount the CD-ROM.
echo
mount
if [ "x$cdtest" != "x" ]
then
 echo
 echo A CD-ROM is currently mounted.
 unmount /dev/cd0
 echo
 echo Unmount Complete.
 echo Please remove the CD from the CD player. \(Hold the button in for about 1
 sec\)
 echo
else
 echo
 echo A CD-ROM is not currently mounted. Perhaps you wish to mount instead.
 echo Do this using: mount-cdrom
 echo
fi


      ----------------------------------------------------------
        Rob Parry                  rparry@hydrolab.arsusda.gov
        USDA-ARS-Hydrology Lab     Phone: (301) 504-8625
        Beltsville, MD             FAX:   (301) 504-8931
      ----------------------------------------------------------
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU