Automating mounting of ISO images

Polytropon freebsd at edvax.de
Wed Mar 23 21:21:45 UTC 2011


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



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


More information about the freebsd-questions mailing list