Change the icon of a FreeBSD served AFP server

I found a blogpost describing the setup of the icon:

http://www.simonwheatley.co.uk/2008/04/06/avahi-finder-icons/

So create (if not already present) a file:

/usr/local/etc/avahi/services/afp.service

And put e.g. this in it:

<?xml version="1.0" standalone='no'?><!---nxml---> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group>   <name replace-wildcards="yes">%h</name>   <service>     <type>_afpovertcp._tcp</type>     <port>548</port>   </service>   <service>     <type>_device-info._tcp</type>     <port>0</port>     <txt-record>model=Xserve</txt-record>   </service> </service-group>

This will display the AFP server as an Xserve :-)

The different model found in the plist  that defines the graphics are:

(/System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist)

NameIDModels
PCpublic.generic-pcWindows Windows2000 WindowsXP Windows2003 WindowsVista Windows2008 Windows7
Maccom.apple.macMacintosh
Laptopcom.apple.mac.laptopLaptop
Towercom.apple.mac.towerTower
PowerBookcom.apple.powerbookPowerBook
PowerBook G4com.apple.powerbook-g4-titaniumPowerBook3,2 PowerBook3,3 PowerBook3,4 PowerBook3,5
PowerBook G4com.apple.powerbook-g4-12PowerBook6,1 PowerBook6,2 PowerBook6,4 PowerBook6,8
PowerBook G4com.apple.powerbook-g4-15PowerBook5,2 PowerBook5,4 PowerBook5,6 PowerBook5,8
PowerBook G4com.apple.powerbook-g4-17PowerBook5,1 PowerBook5,3 PowerBook5,5 PowerBook5,7 PowerBook5,9
iBook G4com.apple.ibook-g4PowerBook6,3 PowerBook6,5 PowerBook6,7
Power Maccom.apple.powermacPowerMac
Power Mac G4com.apple.powermac-g4-quicksilverPowerMac3,5
Power Mac G4com.apple.powermac-g4-mirrored-drive-doorsPowerMac3,6
Power Mac G5com.apple.powermac-g5PowerMac7,2 PowerMac7,3 PowerMac9,1 PowerMac11,2 PowerMac11,2,Quad
Xservecom.apple.xserveRackMac Xserve
(null)com.apple.macmini-unibodyMacmini4,1
(null)com.apple.macmini-unibody-no-opticalMacmini Macmini5,1 Macmini5,2 Macmini5,3
eMaccom.apple.emacPowerMac4,4 PowerMac6,4
iMaccom.apple.imaciMac
(null)com.apple.imac-g4-15PowerMac4,2
(null)com.apple.imac-g4-17PowerMac4,5 PowerMac6,1
(null)com.apple.imac-g4-20PowerMac6,3
iMac G5com.apple.imac-g5PowerMac8,1 PowerMac8,2
(null)com.apple.imac-g5-isightPowerMac12,1
(null)com.apple.imac-core-duoiMac4,1 iMac4,2
(null)com.apple.imac-core-2-duoiMac5,1 iMac5,2
(null)com.apple.imac-iSight-24iMac6,1
(null)com.apple.imac-aluminum-20iMac7,1 iMac8,1
(null)com.apple.imac-aluminum-24iMac9,1
(null)com.apple.imac-unibody-21iMac11,2 iMac12,1
(null)com.apple.imac-unibodyiMac10,1 iMac11,1 iMac11,3 iMac12,2
MacBookcom.apple.macbookMacBook
(null)com.apple.macbook-whiteMacBook1,1 MacBook2,1 MacBook3,1 MacBook4,1 MacBook5,2 MacBook1,1,White MacBook2,1,White MacBook3,1,White MacBook4,1,White
(null)com.apple.macbook-blackMacBook1,1,Black MacBook2,1,Black MacBook3,1,Black MacBook4,1,Black
(null)com.apple.macbook-unibodyMacBook5,1
(null)com.apple.macbook-unibody-plasticMacBook6,1 MacBook7,1
(null)com.apple.macbookpro-13-unibodyMacBookPro5,5 MacBookPro7,1 MacBookPro8,1
MacBook Procom.apple.macbookproMacBookPro
(null)com.apple.macbookpro-15MacBookPro1,1 MacBookPro2,2 MacBookPro3,1 MacBookPro4,1
(null)com.apple.macbookpro-15-unibodyMacBookPro5,1 MacBookPro5,3 MacBookPro5,4 MacBookPro8,2
(null)com.apple.macbookpro-17-unibodyMacBookPro5,2 MacBookPro6,1 MacBookPro8,3
(null)com.apple.macbookpro-17MacBookPro1,2 MacBookPro2,1
MacBook Aircom.apple.macbookairMacBookAir1,1 MacBookAir2,1
(null)com.apple.macbookair-11-unibodyMacBookAir3,1 MacBookAir4,1
(null)com.apple.macbookair-13-unibodyMacBookAir MacBookAir3,2 MacBookAir4,2
Mac Procom.apple.macproMacPro MacPro1,1 MacPro2,1 MacPro3,1 MacPro4,1 MacPro5,1
Apple TVcom.apple.apple-tvAppleTV AppleTV1,1
iPhonecom.apple.iphoneM68AP iPhone1,1
iPhone 3Gcom.apple.iphone-3gN82AP iPhone1,2
iPhone 3GScom.apple.iphone-3gsN88AP iPhone2,1
iPhone 4com.apple.iphone-4N90AP iPhone iPhone3,1
iPodcom.apple.ipodiPod
iPod touchcom.apple.ipod-touchN45AP iPod1,1
iPod touchcom.apple.ipod-touch-2N72AP iPod2,1
iPod touchcom.apple.ipod-touch-3N18AP iPod3,1
iPod touchcom.apple.ipod-touch-4N81AP iPod4,1
iPadcom.apple.ipadK48AP iPad iPad1,1
AirPort Expresscom.apple.airport-expressAirPort4 AirPort4,102 AirPort4,107
AirPort Extremecom.apple.airportAirPort AirPort5 AirPort5,104 AirPort5,105 AirPort5,108 AirPort5,114 AirPort5,117
Time Capsulecom.apple.time-capsuleAirPort6 AirPort6,106 TimeCapsule TimeCapsule6 TimeCapsule6,106 TimeCapsule6,109 TimeCapsule6,113 TimeCapsule6,116
ame