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

Re: config file name and format change



On Thu, Feb 04, 2021 at 05:38:03PM +0100, wferi@niif.hu wrote:
> Marc Haber <mh+debian-mentors@zugschlus.de> writes:
> > I would like to deliver a YAML config file with the package and have the
> > old file still supported if an old file is still there (optimally
> > printing a warning when starting up with old format). I would prefer to
> > avoid a wrapper script.
> >
> > My idea would be to have two distinct systemd units, ser2net and
> > ser2net-oldconfig, with appropriate ConditionPathExists directives.
> >
> > Is there something more elegant?
> 
> Not sure it's better, but what about checking in the postinst if the old
> config file is present and if so installing a unit file snippet under
> /etc/systemd/system/ser2net.service.d overriding the ExecStart line for
> the old config file?  (I wouldn't use /etc/default/ser2net at all.)
> And of course include a comment asking for its removal.

That would break configuration for all people who have set a different
conffile in /etc/default/ser2net. This is one of the case where
configurability makes things a lot harder for the package maintenance.
If I hadn't made the configuration file location configurable this would
be a no-brainer.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421


Reply to: