howto convert configfile on library update?

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

 



Hi All,

As discussed previously I'm working on getting lm_sensors-3.0.0 into F-9, this not only means updating applications because the API has changed, but also requires updating the /etc/sensors.conf configfile. A script for converting it is provided by upstream.

But how / when do I run this script, obviously it should get run on %post, and only if this is an update. But when?

I can rename the configfile installed by the package from /etc/sensors.conf to /etc/sensors3.conf (the new lib will first check for sensors3.conf and then sensors.conf to allow parallel installation). Then if the configfile was edited an /etc/sensors.conf.rpmsave will be made. I could then check for the existence of this and use the convert script to convert it to the new format and install the converted file as /etc/sensors3.conf, and last remove /etc/sensors.conf.rpmsave to make sure this is only done once.

But what if someone has an old /etc/sensors.conf.rpmsave around and is currently happily using a pristine version of /etc/sensors.conf? I could check the timestamp on the /etc/sensors.conf.rpmsave, assuming it has a timestamps dating from when rpm backed it up, does it? Still feels a bit hacky to me.

Regards,

Hans


--
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux