I just updated the OpenWRT Time Machine wiki, making corrections so that it is valid for the final release of Attitude Adjustment (r36088). The previous version was written for Attitude Adjustment RC1, had a couple of sections that were just unnecessary, and referenced scripts and file locations that don't exist in the current release.
One of the missing details was in the configuration of Avahi. As far as I could gather, the best practice is to create an XML file in the /etc/avahi/services directory to allow avahi to advertise the AFP volume. Based on https://dev.openwrt.org/ticket/12820 and https://dev.openwrt.org/ticket/10245, I created the file /etc/avahi/services/afpd.service with the following:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Time Capsule</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=TimeCapsule</txt-record>
</service>
<service>
<type>_adisk._tcp</type>
<port>9</port>
<txt-record>sys=waMA=XX:XX:XX:XX:XX:XX,adVF=0x100</txt-record>
<txt-record>dk1=adVF=0x83,adVN=TimeMachine</txt-record>
</service>
</service-group>where XX:XX:XX:XX:XX:XX is the MAC address of the LAN interface.
Everything works just fine, but I'd like to confirm my approach so that I'm not contributing yet another bad example on how to set up Time Machine (there are enough bad ones already on the web).
I've found many examples of the first two services of the service-group. Looking at the code, it seems simple enough and I'm not too concerned about that part of the file. But I was only able to find a few examples of the last service:
<service>
<type>_adisk._tcp</type>
<port>9</port>
<txt-record>sys=waMA=XX:XX:XX:XX:XX:XX,adVF=0x100</txt-record>
<txt-record>dk1=adVF=0x83,adVN=TimeMachine</txt-record>
</service>This section of the XML file is required for the disk to show up under the "Select Disk" dialog in the Time Machine Preferences pane. The MAC address is pretty straightforward, as is "TimeMachine" in the second line (which refers to the name of the volume defined in the netatalk afpd.conf and AppleVolumes.default files). The "dk1" refers to the disk number, and I've seen "dk0" suggested in at least one example. Only "dk1" works, so I left it that way. I have also seen examples that specify the UUID of the disk on another line, but it seems to work just fine without it.
My problem is that I could not find any documentation on Avahi XML files, much less any details into the "txt-record" lines. What is required and what is just "nice to have"? Can anyone point me to documentation on this?

