Automating mounting of ISO images

Polytropon freebsd at
Wed Mar 23 21:21:45 UTC 2011

On Wed, 23 Mar 2011 14:17:38 -0700, Chuck Swiger <cswiger at> 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...

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 present.

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list