diff options
Diffstat (limited to 'deploy/adapters/cobbler/snippets/redhat_register')
-rw-r--r-- | deploy/adapters/cobbler/snippets/redhat_register | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/deploy/adapters/cobbler/snippets/redhat_register b/deploy/adapters/cobbler/snippets/redhat_register new file mode 100644 index 00000000..966e44f8 --- /dev/null +++ b/deploy/adapters/cobbler/snippets/redhat_register @@ -0,0 +1,18 @@ +# begin Red Hat management server registration
+#if $redhat_management_type != "off" and $redhat_management_key != ""
+mkdir -p /usr/share/rhn/
+ #if $redhat_management_type == "site"
+ #set $mycert_file = "RHN-ORG-TRUSTED-SSL-CERT"
+ #set $mycert = "/usr/share/rhn/" + $mycert_file
+wget http://$redhat_management_server/pub/RHN-ORG-TRUSTED-SSL-CERT -O $mycert
+perl -npe 's/RHNS-CA-CERT/$mycert_file/g' -i /etc/sysconfig/rhn/*
+ #end if
+ #if $redhat_management_type == "hosted"
+ #set $mycert = "/usr/share/rhn/RHNS-CA-CERT"
+ #end if
+ #set $endpoint = "https://%s/XMLRPC" % $redhat_management_server
+rhnreg_ks --serverUrl=$endpoint --sslCACert=$mycert --activationkey=$redhat_management_key
+#else
+# not configured to register to any Red Hat management server (ok)
+#end if
+# end Red Hat management server registration
|