[Libosinfo] [osinfo-db v2] rhel: Add support to registering to the subscription-manager
Fabiano Fidêncio
fabiano at fidencio.org
Mon Jan 16 18:29:32 UTC 2017
From: Fabiano Fidêncio <fidencio at redhat.com>
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 at fidencio.org>
---
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
More information about the Libosinfo
mailing list