[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

What causes a config file to be detected as changed by user?



I have written, and am maintaining an unofficial debian package, for
apache karaf made with standard debian tools
 https://github.com/steinarb/karaf-debian
 https://karaf.apache.org

This debian package asks me on every upgrade that since
/etc/karaf/config.properties have been modified locally do I wish to
keep that version or do I wish to install the maintainer's version.

Since the config.properties files is a file I have no particular
interest of, the answer is always to istall the maintainer's version.

But since this is obviously something I have done I'm trying to figure
out why this happens.

The only place where config.properties appear in the git-versioned code
of the debian packaging, is in the postinst script:
 https://github.com/steinarb/karaf-debian/blob/03157cfac337531b96e5011bac9f14cd68fdcbfc/debian/karaf.postinst#L14

What the postinst script does, is:
 1. If not present, create user karaf with group karaf
 2. Change ownershipt of /etc/karaf and its contents to karaf:karaf with
    public read/write removed and group write

Is this the wrong way of setting owneship and access of the files? 

(I did it in postinst since the user and group needs to be present
before changing ownership)

Why is config.properties the only file affected and not all of the *.cfg files?

Thanks!


Reply to: