[FELIX-5021] Use the system bundle to find bundles to look at for shell and info wiring commands

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1700091 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/gogo/command/src/main/java/org/apache/felix/gogo/command/Activator.java b/gogo/command/src/main/java/org/apache/felix/gogo/command/Activator.java
index e9e5afd..dbff094 100644
--- a/gogo/command/src/main/java/org/apache/felix/gogo/command/Activator.java
+++ b/gogo/command/src/main/java/org/apache/felix/gogo/command/Activator.java
@@ -29,6 +29,7 @@
 
     public void start(BundleContext bc) throws Exception
     {
+        BundleContext systemBundleContext = bc.getBundle(0).getBundleContext();
         Hashtable props = new Hashtable();
         props.put("osgi.command.scope", "felix");
         props.put("osgi.command.function", new String[] {
@@ -37,7 +38,7 @@
             "resolve", "start", "stop", "uninstall", "update",
             "which" });
         bc.registerService(
-            Basic.class.getName(), new Basic(bc), props);
+            Basic.class.getName(), new Basic(systemBundleContext), props);
 
         // Register "inspect" command for R4.3 or R4.2 depending
         // on the underlying framework.
@@ -47,7 +48,7 @@
         {
             getClass().getClassLoader().loadClass("org.osgi.framework.wiring.BundleWiring");
             bc.registerService(
-                Inspect.class.getName(), new Inspect(bc), props);
+                Inspect.class.getName(), new Inspect(systemBundleContext), props);
         }
         catch (Throwable th)
         {
diff --git a/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Activator.java b/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Activator.java
index dcf4ebb..666dfc1 100644
--- a/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Activator.java
+++ b/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Activator.java
@@ -99,7 +99,7 @@
         dict.put(CommandProcessor.COMMAND_SCOPE, "gogo");
 
         // register converters
-        regs.add(context.registerService(Converter.class.getName(), new Converters(context), null));
+        regs.add(context.registerService(Converter.class.getName(), new Converters(context.getBundle(0).getBundleContext()), null));
 
         // register commands