Skip to main content
Solved

Problem deploying a package with installer

  • February 14, 2022
  • 4 replies
  • 67 views

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.

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+24
  • Legendary Contributor
  • 7886 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

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

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