I have build my own .deb package with custom /root/.bashrc file. When I try to install this package, I get the following message:
Configuration file '/root/.bashrc' ==> File on system created by you or by a script. ==> File also in package provided by package maintainer. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** .bashrc (Y/I/N/O/D/Z) [default=N] ?
I put this line in DEBIAN/preinst:
export DEBIAN_FRONTEND=noninteractive
but it doesn't make any difference, I'm still getting the message. Is there any mechanism to disable this message inside the .deb package? I need it for automated installs so I need absolutely non-interactive installation.
As a workaround, I can put the export inside the deployment script before apt-get install, but I would rather do it in the package.
Thanks in advance
update: I tried the workaround with export in the deployment script, but it doesn't work correctly. The installation runs non-interactively but it doesn't overwrite the .bashrc file because the default choice is N (keep your currently-installed version).
Another workaround is to remove the config file itself from the package and instead "echo" it from the postinst script. But again, it's just a workaround, I would like to achieve it with some directive in the package.
.bashrc
. That file would not even run if the user uses anything other than Bash as their login shell btw.root
is a user. If a package messed with my~root/.bashrc
, I'd be strongly tempted to track down the package provider and "reason" with him/her.