Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Preserving locally modified configuration files - Dpkg::Options --force-confdef & --force-confold not working on command line

148 views
Skip to first unread message

Jaikumar Sharma

unread,
Jun 15, 2021, 5:10:04 AM6/15/21
to
Hi,

In debian 9.13 server, i'm using custom configuration (locally modified) file /etc/samba/smb.conf , I do not want to upgrade this file and retain the old configuration file without prompting during automatic upgrades  but it is still giving me the prompt even after specifying on command line :

sudo apt-get dist-upgrade -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold -y --allow-unauthenticated

Still prompt/complain about locally modified configuration file, as per documentation it should work.

and 

I've also tried to put these below command in a config file under /etc/apt/apt.conf.d/50-unattended-upgrades :

Dpkg::Options {
  "--force-confdef";
 "--force-confold";
}

but behaviour is the same in both cases.

Does somebody know what may be wrong here? or i'm doing it wrong?

Thank you.
Regards,
Jaikumar

Jaikumar Sharma

unread,
Jun 15, 2021, 6:40:05 AM6/15/21
to
On Tue, Jun 15, 2021 at 2:34 PM Jaikumar Sharma <jaikuma...@gmail.com> wrote:
Hi,

In debian 9.13 server, i'm using custom configuration (locally modified) file /etc/samba/smb.conf , I do not want to upgrade this file and retain the old configuration file without prompting during automatic upgrades  but it is still giving me the prompt even after specifying on command line :

sudo apt-get dist-upgrade -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold -y --allow-unauthenticated

Still prompt/complain about locally modified configuration file, as per documentation it should work.

and 

I've also tried to put these below command in a config file under /etc/apt/apt.conf.d/50-unattended-upgrades :

Dpkg::Options {
  "--force-confdef";
 "--force-confold";
}

Seems it co-relates with already filed bug  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=316049 

jaikuma...@gmail.com

unread,
Jun 15, 2021, 6:50:04 AM6/15/21
to
On Tuesday, June 15, 2021 at 2:40:04 PM UTC+5:30, jaikuma...@gmail.com wrote:
> Hi,
>
> In debian 9.13 server, i'm using custom configuration (locally modified) file /etc/samba/smb.conf , I do not want to upgrade this file and retain the old configuration file without prompting during automatic upgrades but it is still giving me the prompt even after specifying on command line :
>
> sudo apt-get dist-upgrade -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold -y --allow-unauthenticated
>
> Still prompt/complain about locally modified configuration file, as per documentation it should work.
>
> and
>
> I've also tried to put these below command in a config file under /etc/apt/apt.conf.d/50-unattended-upgrades :
>
> Dpkg::Options {
> "--force-confdef";
> "--force-confold";
> }

Brian

unread,
Jun 15, 2021, 7:00:05 AM6/15/21
to
I wonder whether using dpkg-divert(1) would help in preserving your
modified file?

--
Brian.

Jaikumar Sharma

unread,
Jun 16, 2021, 12:20:04 AM6/16/21
to
Yes, this option was intentionally avoided by me because of scripting the maintainer scripts. I only have the option to use this now. Thanks Brian :)

--
Jaikumar
0 new messages