Only try to unmount/remove mountpt if it's defined

This commit is contained in:
ngie 2016-01-01 00:16:54 +00:00
parent a859d88d20
commit ad4c61ab7d

View File

@ -6,8 +6,10 @@ base=`basename $0`
uzip_test_cleanup()
{
umount $mntpoint
rmdir $mntpoint
if [ -n "$mntpoint" ]; then
umount $mntpoint
rmdir $mntpoint
fi
geom_test_cleanup
}
trap uzip_test_cleanup ABRT EXIT INT TERM