[PATCH audrey 2/2] Only use --org for more recent versions of subscription-manager

James Laska jlaska at redhat.com
Fri Apr 13 17:15:57 UTC 2012


On systems with subscription-manager-0.95.* (e.g. RHEL5.7), the
'register --org' option does not exist.  This patch will change the
provided example registration to conditionally use the "--org" option
during registration.
---
 configserver/examples/katello-register.xml |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configserver/examples/katello-register.xml b/configserver/examples/katello-register.xml
index cc49e5a..8d94960 100644
--- a/configserver/examples/katello-register.xml
+++ b/configserver/examples/katello-register.xml
@@ -222,7 +222,6 @@ def register_katello_command():
     sm_ver_maj, sm_ver_min = subscription_manager_version()
 
     cmd = "subscription-manager register --force"
-    cmd += " --org=%s" % org
 
     if sm_ver_maj <= 0:
         if sm_ver_min < 96:
@@ -234,6 +233,7 @@ def register_katello_command():
             else:
                 pass # determine and print error condition to stdout
         else:
+            cmd += " --org=%s" % org
             if auto_subscribe:
                 cmd += " --username=%s --password=%s" % (username, password)
                 cmd += " --env=%s" % kat_env
-- 
1.7.7.6




More information about the aeolus-devel mailing list