-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 3/23/11 2:49 PM, Ryan Coleman wrote:
I have a folder full of ISOs that we're sharing on the network instead of
having the discs available (seems like a good idea, right?)
But I want to automate the process on boot instead of having to write a
On Wed, 23 Mar 2011 13:49:46 -0500, Ryan Coleman edi...@d3photography.com
wrote:
I have a folder full of ISOs that we're sharing on the
network instead of having the discs available (seems
like a good idea, right?)
Please use the correct terminology: FreeBSD (as any UNIX
operating systems)
Hi--
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]
How can I do this? I've always been given these types of scripts in the past
at an
On Wed, 23 Mar 2011 13:49:46 -0500, Ryan Coleman edi...@d3photography.com
wrote:
I have a folder full of ISOs that we're sharing on the
network instead of having the discs available (seems
like a good idea, right?)
Please use the correct terminology: FreeBSD (as any UNIX
operating systems)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 3/23/11 2:49 PM, Ryan Coleman wrote:
I have a folder full of ISOs that we're sharing on the network instead of
having the discs available (seems like a good idea, right?)
But I want to automate the process on boot instead of having to write a
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).
So I'd like to have just the filename, not the
On Wed, 23 Mar 2011 15:06:14 -0500, Ryan Coleman edi...@d3photography.com
wrote:
I am also trying to make the directories right before the attempt
to mount the image (a 'duh' moment just now).
So I'd like to have just the filename, not the full path, made
as a folder...
A directory. :-)
On Mar 23, 2011, at 3:16 PM, Polytropon wrote:
On Wed, 23 Mar 2011 15:06:14 -0500, Ryan Coleman edi...@d3photography.com
wrote:
I am also trying to make the directories right before the attempt
to mount the image (a 'duh' moment just now).
So I'd like to have just the filename, not the
Here's the working script (Yay!)
#! /bin/sh
for FILE in /mount/disc_images/*.iso; do
DEST=$FILE
DIRNAME=`basename ${FILE} .iso`
echo ${DIRNAME} ${FILE}
mkdir /mount/new_brighton/images/${DIRNAME}
mount -t cd9660 /dev/`mdconfig -f ${FILE}`
/mount/new_brighton/images/${DIRNAME}
done
On Wed, 23 Mar 2011 15:35:21 -0500, Ryan Coleman edi...@d3photography.com
wrote:
Here's the working script (Yay!)
#! /bin/sh
for FILE in /mount/disc_images/*.iso; do
DEST=$FILE
DIRNAME=`basename ${FILE} .iso`
echo ${DIRNAME} ${FILE}
mkdir /mount/new_brighton/images/${DIRNAME}
On Mar 23, 2011, at 3:45 PM, Polytropon wrote:
On Wed, 23 Mar 2011 15:35:21 -0500, Ryan Coleman edi...@d3photography.com
wrote:
Here's the working script (Yay!)
#! /bin/sh
for FILE in /mount/disc_images/*.iso; do
DEST=$FILE
DIRNAME=`basename ${FILE} .iso`
echo ${DIRNAME} ${FILE}
On Wed, 23 Mar 2011 16:05:12 -0500, Ryan Coleman edi...@d3photography.com
wrote:
I did try that once and it didn't strip the directory structure
out so when basename worked I didn't mess with it too much.
I've just checked - you're right. While `basename` works
as intended, ${%} can be applied
On Mar 23, 2011, at 1:06 PM, Ryan Coleman wrote:
I am also trying to make the directories right before the attempt to mount
the image (a 'duh' moment just now).
So I'd like to have just the filename, not the full path, made as a folder...
Ah, yes-- add mkdir -p
On Wed, 23 Mar 2011 14:17:38 -0700, Chuck Swiger cswi...@mac.com wrote:
Ah, yes-- add mkdir -p /mount/office_files/images/${DEST} before the mount
command.
Someone else mentioned a use of basedir command
Prefix it with a test:
[ -d /mount/office_files/images/${DEST} ] mkdir...
On Mar 23, 2011, at 2:21 PM, Polytropon wrote:
Prefix it with a test:
[ -d /mount/office_files/images/${DEST} ] mkdir...
mount...
so there will be no error if the script is started for the
second time (and the directories still exist), means: create
them only if not yet
On Wed, 23 Mar 2011 14:24:43 -0700, Chuck Swiger cswi...@mac.com wrote:
While I agree with this suggested change from the perspective
of only doing work if you actually need to do it, note that
mkdir -p doesn't return an error if the directory already
exists. :-)
You're telling this to a man
16 matches
Mail list logo