Package: slbackup Severity: normal Tags: l10n patch
Dear maintainer, Running dpkg-reconfigure slbackup fails when there is a /etc/slbackup/slbackup.conf file in place. This problem can be solved with the attached patch applied to debian/slbackup.postinst. A real life test with the patched file showed that a reconfiguration of slbackup with dpkg-reconfigure is possible. -- Kind regards, Frans Spiesschaert
--- slbackup.postinst 2019-02-08 22:24:33.000000000 +0100 +++ slbackup.postinst.new 2020-02-23 14:29:48.609309603 +0100 @@ -9,6 +9,7 @@ use Debconf::Client::ConfModule ":all"; use Config::General; use File::Path qw(make_path); +use File::Copy; ## subsections @@ -34,9 +35,11 @@ my $server_user = get("slbackup/server_user"); # check if config-file (/etc/slbackup/slbackup.conf) exists, and - # if it doesn't, we'll make one - if ( ! -e "/etc/slbackup/slbackup.conf" ) { - # make config file + # if it does, move it first to (/etc/slbackup/slbackup.conf.dpkg) + if ( -e "/etc/slbackup/slbackup.conf" ) { + move("/etc/slbackup/slbackup.conf","/etc/slbackup/slbackup.conf.dpkg") + } + # compose configuration file my %confighash; my $config = \%confighash; $config->{client}->{$client_name}->{address} = $client_address; @@ -65,7 +68,7 @@ # write configuration file my $datafile = new Config::General(); $datafile->save_file("/etc/slbackup/slbackup.conf", $config); - } + # check if file specifying cron-job exists and if the user wanted to # configure slbackup now, and make one the answers to both questions