[haiku-development] NetFS settings

  • From: Sean Healy <jalopeura@xxxxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Thu, 28 Aug 2014 17:51:11 -0700

Hi,

I am working on converting NetFS to a package. There are a couple of required driver settings files. I checked driver_settings.cpp and found that it checks only the user settings folder, which means I do not have the option of turning these settings files into global settings files.

However, while global settings files are automatically installed and/or updated by the package management system (or at least can be), user settings are not.

The official (?) package policy [1] says "A post-install script should be considered the last resort. It should only be used, if there's no reasonable alternative."

My current solution is to put template settings files into the package, along with a note in the metadata that if this is the first installation on the system, the user needs to manually copy those files.

I don't really like that solution, because these settings files are required, not optional, so the user is forced to perform an extra step before the software is usable.

So unless the package management gurus can suggest a better alternative, I think this is an appropriate case for a post-install script, to check whether the user has the proper files already and if not, to copy the templates.

What say you?

And is there a good example somewhere of a post-install script?

[1] https://dev.haiku-os.org/wiki/PackageManagement/PackagingPolicy

Other related posts: