I have a script that runs successfully from the command line. I have a launchdaemon that loads the script from the command line and it runs successfully, whether I load from command line or when I restart the machine. When I restart my machine and let the launchd run as intended, the Console reads the DSCL record, but when I start up WorkGroup manager, the record is not there.
Can anyone see what might be wrong? What I'm missing?
macAddress=`/sbin/ifconfig en0 | /usr/bin/grep 'ether' | /usr/bin/sed "s/^[[:space:]]ether //" | cut -f1 -d " "`
/usr/bin/dscl . -create /Computers/Desktop ENetAddress $macAddress
/usr/bin/dscl . -read /Computers/Desktop
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
Console log after reboot:
5/17/10 10:48:09 AM com.apple.launchd *** launchd has started up. ***
5/17/10 10:48:23 AM sh.attrsetup 00:1f:5b:ea:90:89
5/17/10 10:48:23 AM sh.attrsetup AppleMetaNodeLocation: /Local/Default
5/17/10 10:48:23 AM sh.attrsetup ENetAddress: 00:1f:5b:ea:90:89
5/17/10 10:48:23 AM sh.attrsetup GeneratedUID: CAB6BCA7-DCED-4779-804C-E1C11AB253A7
5/17/10 10:48:23 AM sh.attrsetup RecordName: Desktop
5/17/10 10:48:23 AM sh.attrsetup RecordType: dsRecTypeStandard:Computers