Posted on 10-06-2014 07:30 AM
Hi
We have problems deploying a network profile because of a defect in the way Casper Suite handles Wired 802.1x Network Profiles.
Now we would like to copy and install the profile on the machines with a Policy. The steps are
I tried this command:
#!/bin/sh
hostname="$2"
sed -i.backup -e 's/hostname-to-be-replaced/$hostname/' /private/tmp/Wired and Wireless.mobileconfig
# /usr/bin/profiles -I -F /tmp/Wired and Wireless.mobileconfig
But somehow the $2 Variable for the hostname is not recognized. It just writes "$hostname" into the file where the placeholder "hostname-to-be-replaced" was. Any Idea how the correct syntax should be here?
Thanks for your help!
Posted on 10-06-2014 12:21 PM
Just figured it out by myself :-). Like this ist works
hostname="$2"
sed -i.backup -e "s/hostname-to-be-replaced/$hostname/" /private/tmp/Wired and Wireless.mobileconfig
# /usr/bin/profiles -I -F /tmp/UEFA Wired and Wireless.mobileconfig