> On Nov 29, 2016, at 11:06 AM, Aashish Sharma <[email protected]> wrote: > > I have a package where I provide a sample configuration file for people to > redef according to their needs and specifics. > > Now everytime when they upgrade the package, I risk over writing their > modified config file. > > SO I decided to call the config file scan-config.bro.orig but then I am > running into issues of which one to load and how to determine the presence of > an already existing scan-config.bro in __load__.bro > > The idea of asking uses to redef outside package directory might be > cumbersome for unfamiliar users. > > Any thoughts ?
At the moment, the best thing would be to ask users to explicitly copy/modify/@load the sample config file somewhere in the site/ dir. But a new feature could be added to bro-pkg that allows package authors to specify a list of config files in their bro-pkg.meta. Then on install/upgrade/remove, if a user has made modifications to any of those files, they can be warned/prompted about how to proceed (show a diff, ask to overwrite or keep modified version, etc.). This seems a common way to handle config files in the package management scene. Would such a feature work for you? - Jon _______________________________________________ bro-dev mailing list [email protected] http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev
