On Fri, Aug 30, 2002 at 06:35:39PM -0400, Greg Freemyer wrote:
>
> if [ -e "$SCRATCH_SNAP_MNT" ]; then rm -rf "$SCRATCH_SNAP_MNT"; fi
ummm is $SCRATCH_SNAP_MNT normally an empty mountpoint directory? if
so please use rmdir and test its exit status (abort if rmdir fails)
don't use rm -rf since you can't be certain there isn't something
mounted there, or something stored there (shouldn't be but do you
really want to chance it? rm -rf'ing data without warning is a good
way to induce homicidal behavior)
i recommend:
if [ -e "$SCRATCH_SNAP_MNT" ]; then
rmdir "$SCRATCH_SNAP_MNT" || exit 1
fi
--
Ethan Benson
http://www.alaska.net/~erbenson/
-- Attached file included as plaintext by Ecartis --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iEYEARECAAYFAj1wdngACgkQJKx7GixEevxoBQCfahqAivVM3WJXGCKFdg/w1HE1
MQAAniwfD9n3fbY6G7PgTLe7/jp+L0NU
=qMMo
-----END PGP SIGNATURE-----
|