[osinfo-db v2] rhel: Add support to registering to the subscription-manager

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Fabiano Fidêncio <fidencio@xxxxxxxxxx>

In case reg-login and reg-password are non-null, perform the
subscription during the %post phase of the kickstart file.

Signed-off-by: Fabiano Fidêncio <fabiano@xxxxxxxxxxxx>
---
 data/install-script/redhat.com/rhel-kickstart-desktop.xml.in | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/data/install-script/redhat.com/rhel-kickstart-desktop.xml.in b/data/install-script/redhat.com/rhel-kickstart-desktop.xml.in
index 1b917ee..336c746 100644
--- a/data/install-script/redhat.com/rhel-kickstart-desktop.xml.in
+++ b/data/install-script/redhat.com/rhel-kickstart-desktop.xml.in
@@ -16,6 +16,8 @@
         <param name="avatar-disk" policy="optional"/>
         <param name="target-disk" policy="optional"/>
         <param name="script-disk" policy="required"/>
+        <param name="reg-login" policy="optional"/>
+        <param name="reg-password" policy="optional"/>
     </config>
     <injection-method>cdrom</injection-method>
     <injection-method>disk</injection-method>
@@ -152,6 +154,10 @@ AutomaticLogin=<xsl:value-of select="config/user-login"/>
 [debug]
 " > /etc/gdm/custom.conf
 
+if [ -n "<xsl:value-of select="config/reg-login"/>" -a -n "<xsl:value-of select="config/reg-password"/>" ]; then
+    subscription-manager register --username <xsl:value-of select="config/reg-login"/> --password <xsl:value-of select="config/reg-password"/> --auto-attach
+fi
+
 %end
 	</xsl:template>
       </xsl:stylesheet>
-- 
2.9.3

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux