On Thu, Jul 31, 2003 at 03:18:17PM -0500, Ed Hoeffner wrote:
> Pipe abuse!!
> 
> MOUNTPATH=`gawk '/\/dev\/cdrom/{print $2}' /etc/fstab`
> 
> -----Original Message-----
> From: tclug-list-admin at mn-linux.org
> [mailto:tclug-list-admin at mn-linux.org]On Behalf Of Adam Maloney
> Sent: Thursday, July 31, 2003 2:40 PM
> To: 'tclug-list at mn-linux.org'
> Subject: Re: [TCLUG] Newbie question-Getting Mount Information for an
> Install Script
> 
> 
> Assuming it's mounted, and in fstab, and the actual device is /dev/cdrom:
> 
> MOUNTPATH=`cat /etc/fstab | grep "/dev/cdrom" | awk '{ print $2 }'`

Assuming the machine is IDE only you can use:

   for dev in `find /proc/ide/ -name media -exec grep -Hl cdrom {} \; | cut -d/ -f5`; do mount | grep $dev | cut -d" " -f3 ; done

To get the list of mount points for the cdroms in the system.

florin

-- 

"NT is to UNIX what a doughnut is to a particle accelerator."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://shadowknight.real-time.com/pipermail/tclug-list/attachments/20030731/49842742/attachment.pgp