Skip to main content
Question

Script Parameter for Set Distribution Point


Forum|alt.badge.img+3

Scripts in Casper has predefined variables for $1, $2, $3 where

$1 = Mount point of the target drive

$2 = Computer name

$3 = Username

In my script, I want to curl from the distribution point (set during Casper Imaging).
Is there a predefined variable for this? If not, how can I capture it in a variable?

Thank you,

TT

7 replies

bentoms
Forum|alt.badge.img+35
  • Legendary Contributor
  • 4331 replies
  • April 22, 2015

@ttruong can you give more information on what & or why?


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 4 replies
  • April 22, 2015

This application has a package with an add-on file. I need to run the package installer within a directory that includes the add-on file for the installation to be succesful. In my script I'm curling a tar file, extracting the tar into tmp, cd into the directory, and run installer -pkg.

The problem is, we have multiple sites and I don't want to have multiple scripts, for each http:// distribution point for each site. I'm hoping there's a way to capture the distribution point into a variable, based on the selection during Casper imaging. I'm aware I can just bundle everything into a package, but I want to make this work with the given script.

Here's the gist of the script:

PAK=sc_tmsminstall.tar.gz
PAKEXT=tmsminstall
SERV1=sc-mmserver3

downloads installer

echo "Downloading TrendMicro from Distribution Server..."
cd /tmp
curl -O -k http://$SERV1/CasperShare/Packages/$PAK

Unzip and install

echo "Extracting and Installing..."
tar -xzvf $PAK
cd $PAKEXT
installer -pkg $PAKEXT.pkg -target /

Removes installer files

echo "Removing installer files"
rm -rf /tmp/$PAKEXT
rm /tmp/$PAK


bentoms
Forum|alt.badge.img+35
  • Legendary Contributor
  • 4331 replies
  • April 23, 2015

@ttruong Hmm.. I'd go with a PKG & let the JSS handle the logic of which DP to install it from tbh.

I know you've discounted that, but why not let the JSS do the heavy lifting?


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 4 replies
  • April 23, 2015

Even with a PKG, I would need to write installer scripts for each. Anyway, if there's no way of extracting the selected Distriubution Point, I have no choice.


bentoms
Forum|alt.badge.img+35
  • Legendary Contributor
  • 4331 replies
  • April 24, 2015

@ttruong looking at the above script. All you need is the PKG on the DP.

Then via the JSS cache that PKG locally & install it.

I'm still missing the need to script it off of the DP.


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 4 replies
  • April 24, 2015

I need to run the installer with the add-on file in the same directory. How would I do that using JSS cache?


bentoms
Forum|alt.badge.img+35
  • Legendary Contributor
  • 4331 replies
  • April 24, 2015

@ttruong Sorry I didn't see that in the above.

Hmm, what I've done for Sophos is create a DMG of the folder that has the installer & needed additional files.

That's "installed" to a location, then a script runs the installer & tidies up.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings