Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Mar 2011 15:06:14 -0500
From:      Ryan Coleman <editor@d3photography.com>
To:        Chuck Swiger <cswiger@mac.com>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: Automating mounting of ISO images
Message-ID:  <20D9B390-3190-4865-A19E-BDEDC595E7A2@d3photography.com>
In-Reply-To: <31D3BED1-7035-435F-B127-EFAAF6AFF076@mac.com>
References:  <21012F71-5038-45F1-98C6-72A0B1239009@d3photography.com> <31D3BED1-7035-435F-B127-EFAAF6AFF076@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
We're close on this (thanks for the push).

It wants to load the entire path up in ${DEST} which is not ideal but I =
can live with that.

I am also trying to make the directories right before the attempt to =
mount the image (a 'duh' moment just now).=20
So I'd like to have just the filename, not the full path, made as a =
folder...=20

In other news: The ISOs are all made by me, so no special chars, just =
capital and lowercase letters, sometimes numbers, no spaces and use of =
underscores and hyphens.

thanks!


On Mar 23, 2011, at 2:11 PM, Chuck Swiger wrote:

> Hi--
>=20
> On Mar 23, 2011, at 11:49 AM, Ryan Coleman wrote:
>> Disc images are located in /mount/disc_images/ (all are ISOs)
>> They need to mount into /mount/office_files/images/FILENAME [without =
the .iso extension]
>>=20
>> How can I do this? I've always been given these types of scripts in =
the past at an old job but I don't have access to those examples =
anymore.
>=20
> Something like this might do (untested, though):
>=20
> #! /bin/sh                                                             =
                                    =20
>=20
> for FILE in /mount/disc_images/*; do
>   DEST=3D$FILE:r
>   mount -t cd9660 /dev/`mdconfig -f ${FILE}` =
/mount/office_files/images/${DEST}
> done
>=20
> Might need to add quotes if you have spaces or other unusual =
characters in your ISO filenames....
>=20
> Regards,
> --=20
> -Chuck
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20D9B390-3190-4865-A19E-BDEDC595E7A2>