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 2013/11/20 14:08:44 UTC
svn commit: r1543809 - in /karaf/branches/karaf-2.x: ./
shell/config/src/main/java/org/apache/karaf/shell/config/ConfigPropertyCommandSupport.java
Author: cschneider
Date: Wed Nov 20 13:08:44 2013
New Revision: 1543809
URL: http://svn.apache.org/r1543809
Log:
KARAF-2400 document usage of option -b
Modified:
karaf/branches/karaf-2.x/ (props changed)
karaf/branches/karaf-2.x/shell/config/src/main/java/org/apache/karaf/shell/config/ConfigPropertyCommandSupport.java
Propchange: karaf/branches/karaf-2.x/
------------------------------------------------------------------------------
Merged /karaf/branches/karaf-2.3.x:r1543808
Modified: karaf/branches/karaf-2.x/shell/config/src/main/java/org/apache/karaf/shell/config/ConfigPropertyCommandSupport.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.x/shell/config/src/main/java/org/apache/karaf/shell/config/ConfigPropertyCommandSupport.java?rev=1543809&r1=1543808&r2=1543809&view=diff
==============================================================================
--- karaf/branches/karaf-2.x/shell/config/src/main/java/org/apache/karaf/shell/config/ConfigPropertyCommandSupport.java (original)
+++ karaf/branches/karaf-2.x/shell/config/src/main/java/org/apache/karaf/shell/config/ConfigPropertyCommandSupport.java Wed Nov 20 13:08:44 2013
@@ -33,12 +33,15 @@ public abstract class ConfigPropertyComm
@Option(name = "-p", aliases = "--pid", description = "The configuration pid", required = false, multiValued = false)
protected String pid;
- @Option(name = "-b", aliases = { "--bypass-storage" }, multiValued = false, required = false, description = "Do not store the configuration in a properties file, but feed it directly to ConfigAdmin")
+ @Option(name = "-b", aliases = { "--bypass-storage" }, multiValued = false, required = false, description = "Only pass config changes to configuration admin, do not store in a file directly. Only relevant if -p is also set.")
protected boolean bypassStorage;
protected void doExecute(ConfigurationAdmin admin) throws Exception {
Dictionary props = getEditedProps();
+ if (bypassStorage && pid == null) {
+ System.err.println("Warning: option -b does not have any effect unless -p is also specified.");
+ }
if (props == null && pid == null) {
System.err.println("No configuration is being edited--run the edit command first");
} else {