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
- Install the profile in /tmp
- Run a command that replaces a placeholder with the correct hostname of the machine in the profile needed for the connection
- Install the profile
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!