[
https://issues.apache.org/jira/browse/KARAF-2656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14128106#comment-14128106
]
Jean-Baptiste Onofré commented on KARAF-2656:
---------------------------------------------
Use Case 1: first, no cfg file in the etc folder. The cfg file is created in
the etc folder after using config:* commands to create a new configuration. For
instance, with Karaf 2.3.x:
{code}
karaf@root> config:edit my.config
karaf@root> config:propset my key
karaf@root> config:propset another key
karaf@root> config:update
{code}
We can see the my.config.cfg file created in the etc folder, containing the
name/value pairs:
{code}
$ ls -ltr etc
...
etc/my.config.cfg
$ cat etc/my.config.cfg
another = key
my = key
{code}
Use Case 2: the same using the ConfigMBean, same behavior with Karaf 2.3.x.
Use Case 3: the cfg file already exists in the etc folder, we can see the
corresponding configuration using the config:* commands. In Karaf 2.3.x:
{code}
karaf@root> config:list "(service.pid=my.config)"
----------------------------------------------------------------
Pid: my.config
BundleLocation: null
Properties:
service.pid = my.config
another = key
felix.fileinstall.filename =
file:/home/jbonofre/bin/apache-karaf-2.3.6/etc/my.config.cfg
my = key
{code}
with the file etc/my.config.cfg already present.
I will reproduce these use cases on the different branches to have a complete
overview of the current situation.
> Config service doesn't create a file in etc if it doesn't exist
> ---------------------------------------------------------------
>
> Key: KARAF-2656
> URL: https://issues.apache.org/jira/browse/KARAF-2656
> Project: Karaf
> Issue Type: Bug
> Components: karaf-config
> Affects Versions: 3.0.0
> Reporter: Jean-Baptiste Onofré
> Assignee: Jean-Baptiste Onofré
> Priority: Blocker
> Fix For: 2.4.0, 4.0.0, 3.0.2
>
>
> The config service doesn't create a file in etc if the file already exists.
> Previously (in Karaf 2.x) we explicitely created the config file. Now we
> delegate to ConfigAdmin persistence, but we don't provide any persistence
> adapter.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)