You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by cs...@apache.org on 2017/08/03 14:35:18 UTC
[06/15] karaf git commit: Better integration with fileinstall and
configs
Better integration with fileinstall and configs
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/d1ce154d
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/d1ce154d
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/d1ce154d
Branch: refs/heads/OPENSSH
Commit: d1ce154d27c8416911deec29f04594ff805d90df
Parents: b2d3708
Author: Guillaume Nodet <gn...@apache.org>
Authored: Mon Jul 31 21:30:21 2017 +0200
Committer: Guillaume Nodet <gn...@apache.org>
Committed: Wed Aug 2 14:10:48 2017 +0200
----------------------------------------------------------------------
.../features/internal/service/FeatureConfigInstaller.java | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/d1ce154d/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
index e1f0ca8..d1fc525 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
@@ -115,6 +115,16 @@ public class FeatureConfigInstaller {
cfg = createConfiguration(configAdmin, pid[0], pid[1]);
String key = createConfigurationKey(pid[0], pid[1]);
cfgProps.put(CONFIG_KEY, key);
+ props.put(CONFIG_KEY, key);
+ if (storage != null && configCfgStore) {
+ File cfgFile;
+ if (pid[1] != null) {
+ cfgFile = new File(storage, pid[0] + "-" + pid[1] + ".cfg");
+ } else {
+ cfgFile = new File(storage, pid[0] + ".cfg");
+ }
+ cfgProps.put(FILEINSTALL_FILE_NAME, cfgFile.getAbsoluteFile().toURI().toString());
+ }
cfg.update(cfgProps);
try {
updateStorage(pid[0], pid[1], props, false);