Skip to main content
Solved

Problem deploying a package with installer


Forum|alt.badge.img+3

Hello, I'm trying to deploy a package with the installer command and i"m getting some errors. I've tried doing cd /tmp as the other issue suggested but that still wouldn't work.

 

Currently I have a policy that caches the package on the endpoint at a location I assume was /Library/Application Support/JAMF/Downloads

Then a script that copies that to /tmp and tries to run installer on it. Here is the output:

 

Script result: cp: /Library/Application Support/JAMF/Downloads/filename.pkg: No such file or directory Feb 14 12:10:13 installer[4032] <Critical>: PFPkg: No file found at path: /private/tmp/filename.pkg Feb 14 12:10:13 installer[4032] <Critical>: PFPackage::packageWithURL - can't instantiate package: /private/tmp/filenamepkg installer: Error - the package path specified was invalid: 'filename.pkg'.

 

 

Firstly, from the output I assume the cache location is wrong, but also why is it looking at /private/tmp instead of /tmp?

 

Here is the script as well:

 

#!/bin/bash # Find the pkg on your machine and cd to it. filename=$4 cd /tmp cp "/Library/Application Support/JAMF/Downloads/$filename" "/private/tmp" # Create the config for it. echo $filename > filename.txt installer -verbose -pkg $filename -target '/' -dumplog

 

 

Any ideas what could be going wrong?

Best answer by mm2270

As @mickl089 mentions, if you're talking about a standard Apple pkg format, these deploy natively in Jamf Pro without needing to cache and then run a script, but perhaps there's some reason that so clear on why you're attempting to do it this way.

BTW, packages cached with Jamf Pro go into /Library/Application\\ Support/JAMF/Waiting\\ Room/

Also, /private/tmp and /tmp are the same location. It's just that using /tmp/ in a script will resolve properly to /private/tmp/ which is it's actual path.

View original
Did this topic help you find an answer to your question?

4 replies

mickl089
Forum|alt.badge.img+11
  • Valued Contributor
  • 147 replies
  • February 14, 2022

Is this a PKG you want to deploy? If so, you don't need a script at all, or why do you want to solve it this way?


mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • Answer
  • February 14, 2022

As @mickl089 mentions, if you're talking about a standard Apple pkg format, these deploy natively in Jamf Pro without needing to cache and then run a script, but perhaps there's some reason that so clear on why you're attempting to do it this way.

BTW, packages cached with Jamf Pro go into /Library/Application\\ Support/JAMF/Waiting\\ Room/

Also, /private/tmp and /tmp are the same location. It's just that using /tmp/ in a script will resolve properly to /private/tmp/ which is it's actual path.


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 2 replies
  • February 14, 2022
mickl089 wrote:

Is this a PKG you want to deploy? If so, you don't need a script at all, or why do you want to solve it this way?


I have to deploy it with a script because the package requires some extra config files that i excluded from this post


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 2 replies
  • February 14, 2022
mm2270 wrote:

As @mickl089 mentions, if you're talking about a standard Apple pkg format, these deploy natively in Jamf Pro without needing to cache and then run a script, but perhaps there's some reason that so clear on why you're attempting to do it this way.

BTW, packages cached with Jamf Pro go into /Library/Application\\ Support/JAMF/Waiting\\ Room/

Also, /private/tmp and /tmp are the same location. It's just that using /tmp/ in a script will resolve properly to /private/tmp/ which is it's actual path.


Seems like that worked. I change the cp command to point to waiting room instead and it has successfully ran the script! Thank you


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