Mount DMG from Casper Sharepoint for support purposes

maiksanftenberg
Contributor II

Hi.

We want to provide some support DMGs to our IT support that is only visible to them to perform further tests and troubleshootings/repairs without downloading or installing any stuff on the machines.

As we have a big number of offices with local Casper Servers we though about using the Casper Share for that purpose that get mounted when we run a script.

The problem is that after the script run and the DMG get mounted it finishes and closes the DMG and the connection to the Sharepoint.

Therefor we use a sleep timer in the script at the moment.
Did anybody of you is using a simular setup to provide troubleshooting tools etc to IT support?

Thanks

1 ACCEPTED SOLUTION

maiksanftenberg
Contributor II

We finally found a solution for us to support the internal IT support to use applications from a mounted DMG
We use the following to check if the disk is still mounted

Volume="/Volumes/Your_Volume"
mount | grep "on ${Volume}" > /dev/null
Mounted=$?
while [ ${Mounted} -ne 1 ]
do
mount | grep "on ${Volume}" > /dev/null
Mounted=$?
sleep 1m
done

View solution in original post

5 REPLIES 5

RobertHammen
Valued Contributor II

Could you give the staff read-only access to the CasperShare?

If you're trying to install things manually (i.e. not by policy), why not use Casper Remote, if you can?

maiksanftenberg
Contributor II

Thanks Robert.
We could but we want to avoid that they need to mount the server, browse the packages and mount what they need/want.

We try to achieve that via Self Service.

Thanks

mm2270
Legendary Contributor III

You can mount a DMG file from a share or from your local system in a script with hdiutil. Take a look at the man page for more on that.
You could make the mount visible or invisible using the -nobrowse flag when mounting it. Something like this will work. The below assumes the sharepoint is already mounted, but you could include that in the script as a first step as well.

hdiutil attach /Volumes/path/to/Packages/DiskImage.dmg

In short, I think what you're looking to do is possible, but will take a little bit of scripting. If you have a bunch of different DMGs or shares that need to be mounted, I would suggest replacing any hardcoded stuff with parameters you can pass to the script to make it re-usable.

maiksanftenberg
Contributor II

Thanks Mike.

At the moment the script that we use to do it is looking like this:

#!/bin/sh
hdiutil attach /Volumes/Casper_Share/Packages/APP.dmg
sleep 3600

If there would be no sleep command the DMG will be directly unmounted once the script finished (as the connection to the Casper Share get terminated).

maiksanftenberg
Contributor II

We finally found a solution for us to support the internal IT support to use applications from a mounted DMG
We use the following to check if the disk is still mounted

Volume="/Volumes/Your_Volume"
mount | grep "on ${Volume}" > /dev/null
Mounted=$?
while [ ${Mounted} -ne 1 ]
do
mount | grep "on ${Volume}" > /dev/null
Mounted=$?
sleep 1m
done