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?