I'm working on an extension attribute that gets a computer's OU. I found existing code, modified it, and it works great! However, when a user goes off campus, the EA script can't make the ldap query because our domain isn't accessible over the internet. This causes the EA to become blank. It updates to the proper value when the user comes back on campus.
How can I tell an EA to leave the value it has alone? I tried to put something like this at the top of my script (changed my IP's for obvious reasons, but the rest of it is verbatim):
ETH0IP=`ipconfig getifaddr en0`
ETH1IP=`ipconfig getifaddr en1`
if [[ $ETH0IP != "192.168"* ]] && [[ $ETH1IP != "192.168"* ]]; then
exit 0
fi
I thought that if I didn't have a <result> tag it might just kill the script. Unfortunately, I see the same behavior. Anyone else know how to solve this?
