On 6/28/2015 2:26 PM, Anand Buddhdev wrote:
On 28/06/15 17:50, John R Pierce wrote:
why doesn't the config file have the version in it ? not having that
makes your whole system error prone.
Perhaps I wasn't clear. Version 1 of the package uses a config file that
looks like this:
system {
setting1 value1;
setting2 value2;
}
interfaces {
iface1;
iface2;
}
Version 2 of the package has switched to a YAML-based syntax, so the
config file needs to look like this:
system:
setting1: value1
setting2: value2
So, I need to be able to program the RPM so that when upgrading from 1.x
to 2.x, it triggers the conversion utility that converts from v1 to v2
format.
so a regex looking for "system:" vs "system {" should nicely delineate
these. I dunno, I might even put that into the conversion utility and
have it just quit if the file is already in the new format, and always
run it.
--
john r pierce, recycling bits in santa cruz
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos