I've received a request from the Ubuntu community that the OpenHPI daemon not be started by default. This is a common issue for Linux distributions, but I do think it would be a helpful change for the OpenHPI project itself.
Right now, OpenHPI ships with an openhpi.conf file that runs the simulator plug-in. Although that is fairly benign, it is probably not useful to the end user, and almost certainly not the configuration that is desired in the end. It seems to me (and to the Ubuntu people) that it would be better if the OpenHPI daemon did not run unless the user had configured the openhpi.conf file. I think there is a simple way to do this, that doesn't break backward compatibility with existing installations: 1) Add lines to the top of the default openhpi.conf file, something like the following: # The OpenHPI daemon will not run by default, until you have set it up # for your particular hardware situation. After modifying this file, # remove the following line: unconfigured 2) The openhpid init script could grep for "^unconfigured$", and simply exit rather than starting openhpid if that line is found. Done this way, upgrades are not affected because the user's existing openhpi.conf file is already configured. In addition, the behavior is backward compatible because the change in behavior will only occur if a user obtains a fresh (unconfigured) version of openhpi.conf, such as would happen with a new installation. The mechanism I proposed above is the simplest I can see, and could be done in time for 2.15.0. A drawback is that if the user tries to run the daemon by hand, the daemon will see a syntax error in the config file. A different implementation of the same idea could involve the addition of a new environment variable to the first section of the openhpi.conf file (perhaps OPENHPI_UNCONFIGURED) which would be uncommented in the default version of the file. We would then modify the daemon such that it does an immediate exit if a true value is detected in this variable. This is a cleaner approach, but is a little more work. Thoughts? I propose to implement one of the above solutions towards the end of this week unless there is objection. Bryan Sutula ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Openhpi-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openhpi-devel
