[haiku-development] Re: NetFS settings

  • From: "Earl Pottinger" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "earl_colby_pottinger@xxxxxxxxx" for DMARC)
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Tue, 2 Sep 2014 09:33:24 -0700

This may be a dumb suggestion.

But in the driver I am working on right now it uses the driver_settings 
functions to try and load the setting file from the kernel folder and if not 
found not only does it use the default settings it also writes out a default 
setting file.

That means all following boots will see a setting file to load and it can be 
easy to edit by a person if any changes are needed.

I can supply my simple source code if wanted, warning I am not the world's 
greatest programmer.



On Friday, August 29, 2014 3:09:43 AM, Ingo Weinhold <ingo_weinhold@xxxxxx> 
wrote:
 


On 29.08.2014 04:42, Sean Healy wrote:
> On Thu, 28 Aug 2014 19:28:03 -0700, Augustin Cavalier
> <waddlesplash@xxxxxxxxx> wrote:
>     The correct solution is to fix the NetFS source code.
>
> Ah, but the problem is not in the NetFS code. It is in
> cant/remember/the/real/path/driver_settings.cpp, and a change there will
> affect many other packages.

The driver settings code can load driver settings files from anywhere.

However, the server code looks like it should not require a settings 
file, but fall back to default settings. If that doesn't work, it's a 
bug. Note that the default settings don't define any shares or users, so 
that isn't a configuration that will immediately work. Shares and users 
can be defined with the command line preference tool (obviously a GUI 
preflet would be nice to have).

To sum it up, a settings file -- neither a template nor an actual one -- 
should not be added to the package.

I suppose ideally activating the package should show a Deskbar 
notification that something has to be configured, with a link that opens 
the respective GUI preflet. I don't know, if our notifications API 
supports that. From a PM point of view it could be done via a 
post-install script, but I guess we'd rather want the package to declare 
the necessity for additional configuration via a (to-be-added) package 
attribute, so that the information could be presented in a better way by 
the package manager.

CU, Ingo

Other related posts: