configuration vs example files

Asked by Javier Collado on 2009-09-30

It looks like the checkbox configuration files in "configs" directory don't get updated with new config files in "examples" directory. Is this bug or an intended behaviour?

$ diff /usr/share/checkbox/{configs,examples}/checkbox.ini

Question information

English Edit question
Checkbox Edit question
No assignee Edit question
Solved by:
Marc Tardif
Last query:
Last reply:

Looking into the postrm script, it looks like the configuration file should have been removed, but it isn't:

        # remove the configuration file itself
        rm -f $file

Marc Tardif (cr3) said : #2

The examples directory only contains sample configuration files. These should be considered read-only files which should only be replaced by the installation of the checkbox package.

The configs directory is actually a symbolic link. In the source directory, it points to the examples directory and, when installed, it points to the /etc/checkbox.d directory. The reason for this symbolic link is that it provides a consistent way for the application to find the path of configuration files regardlesss of the context: $CHECKBOX_SHARE/configs.

On an installed systems, the files under the examples and configs directories are indeed expected to differ. The reason is that files under the configs directory are meant to reflect the configuration of the system. This is the reason why these files are actually located under the /etc/checkbox.d directory. So, these files can differ from examples for many reasons: the installation applies preseed values, the upgrade applied a patch or the user made changes manually.

Are the files under /etc/checkbox.d directory automatically updated when a new checkbox version is installed?

It looks like my configuration files are older than the ones in the examples directory. Should I have updated them with the ones in the examples directory?

Marc Tardif (cr3) said : #4

To answer your latest comment, notice how the removal of the configuration file is only performed when purging the package. So, if you perform an upgrade, the configuration file should not and will not be removed.

I suspect that your question is trying to solve a specific problem which has not been made clear yet. Please don't hesitate to elaborate on this problem you are trying to solve, perhaps it has been solved already or we can solve it together.

Best Marc Tardif (cr3) said : #5

If upgrading Checkbox has failed to patch configuration files, please report a bug against the checkbox project by providing details such as:

- the release of Ubuntu you are running
- since when you have been upgrading Checkbox
- what is your current version of Checkbox
- your current configuration files under /etc/checkbox.d

Thanks Marc Tardif, that solved my question.