Monday, 2 December 2013

0.2 Release - the avahi-advertise command!

This post is part of my ongoing project to create an Avahi configuration package for Pidora Linux. My last post detailed the behaviour of the avahi service in the Pidora 19 alpha.

As I dig deeper and approach the end of this project, I have discovered that there has not been much "configuration" for me to do for avahi on Pidora Linux. The final product of my project is supposed to configure avahi automatically. The nss-mdns package, Pidora 19 changes, and avahi behaviour have made most of my work simply testing and researching to ensure these features work as intended. I really do not have anything to release other than my findings in these blog posts.

My professor has suggested in the past that I could begin work on a command which would do some of the few tasks I noticed may be helpful to an end user. These include adding TXT entries to avahi advertisements as well as creating service records to advertise other services running on the Raspberry Pi.

This post will contain a link to my 0.2 release. The avahi-advertise (avahi-config?) command! Name suggestions would be appreciated hahaha!
This command is still very primitive and requires a lot of work! I would not advise installing this on any serious machine. There is still much to add, develop, and modularize. Currently, only the TXT creation portion of the code works. I intend to add TXT editing functions as well as service file creation options but those may have to be outside of this course given what little time I have left. Without further ado,


The command will function as follows:
-t (add a txt record to any service file with an option specified)
-s (work with the ssh service file)
-f (work with the ftp service file)
-h (work with the http service file)
-H (work with the https service file)
-u (work with the udisks service file)
-w (work with the smb service file)

When entering the option associated with the service you will be able to create a service record for this service, add/edit TXT records (perhaps an -e options to specify editing of TXT /port values?), or remove the service from being advertised with avahi. There will also be a "--auto" option which will scan for common services (http, vsftpd, ntp, smb, etc) and create service records given the parameters found in their conf files.

I would have liked to add this more useful "service adding" functionality now but I already had the TXT adding portion of this command and so it was easiest to implement.

This command is provided with a GPLv3 license. If you would like to add the functionality I talked about in this post or expand this command into other areas, you are free to do so.

My next release will be my install package to install this command as well as nss-mdns and avahi. The avahi and nss-mdns packages (a.k.a. the auto configuration portion of my project) should be installed at OS install thanks to the collaboration between myself and yshin8.


Post a Comment