[Libosinfo] [PATCH 7/7] data: added lxc install script for suse
Cédric Bosdonnat
cbosdonnat at suse.com
Mon Apr 14 14:09:38 UTC 2014
---
data/install-scripts/Makefile.am | 1 +
data/install-scripts/suse.xml | 41 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+)
create mode 100644 data/install-scripts/suse.xml
diff --git a/data/install-scripts/Makefile.am b/data/install-scripts/Makefile.am
index 78decc2..71dc277 100644
--- a/data/install-scripts/Makefile.am
+++ b/data/install-scripts/Makefile.am
@@ -4,6 +4,7 @@ database_DATA = \
debian.xml \
fedora.xml \
rhel.xml \
+ suse.xml \
ubuntu.xml \
windows-sif.xml \
windows-cmd.xml \
diff --git a/data/install-scripts/suse.xml b/data/install-scripts/suse.xml
new file mode 100644
index 0000000..79ff53d
--- /dev/null
+++ b/data/install-scripts/suse.xml
@@ -0,0 +1,41 @@
+<libosinfo version="0.0.1">
+ <install-script id='http://suse.com/scripts/sle/lxc'>
+ <profile>lxc</profile>
+ <expected-filename>create-rootfs.sh</expected-filename>
+ <config>
+ <param name="admin-password" policy="optional"/>
+ <!-- target-disk contains the path to the rootfs to create -->
+ <param name="target-disk" policy="required"/>
+ <!-- script-disk contains the path to the ISO to use -->
+ <param name="script-disk" policy="required"/>
+ <!-- The registration key from SCC -->
+ <param name="reg-product-key" policy="required"/>
+ </config>
+ <injection-method>lxc</injection-method>
+ <template>
+ <xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+ <xsl:output method="text"/>
+
+ <xsl:template match="/command-line">
+ <xsl:text>/bin/sh</xsl:text>
+ <xsl:value-of select="script/expected-filename"/>
+ </xsl:template>
+
+ <xsl:template match="/install-script-config">#!/bin/sh
+SUSEConnect --root <xsl:value-of select="config/target-disk"/> -r <xsl:value-of select="config/reg-product-key"/>
+zypper --root <xsl:value-of select="config/target-disk"/> --non-interactive \
+ in --auto-agree-with-licenses -t pattern Minimal
+echo "pts/0" >> <xsl:value-of select="config/target-disk"/>etc/securetty
+ <xsl:if test="config/admin-password != ''">
+echo "root:<xsl:value-of select="config/admin-password"/>" | chpasswd \
+ --root <xsl:value-of select="config/target-disk"/>
+ </xsl:if>
+ </xsl:template>
+
+ </xsl:stylesheet>
+ </template>
+ </install-script>
+</libosinfo>
--
1.8.4.5
More information about the Libosinfo
mailing list