[Libosinfo] [PATCH 7/7] data: added lxc install script for suse
Cedric Bosdonnat
cbosdonnat at suse.com
Mon Apr 14 16:11:50 UTC 2014
On Mon, 2014-04-14 at 15:39 +0100, Zeeshan Ali (Khattak) wrote:
> On Mon, Apr 14, 2014 at 3:09 PM, Cédric Bosdonnat <cbosdonnat at suse.com> wrote:
> > ---
>
> Finally, someone adding script for openSUSE. \o/ Some comments:
>
> 1. Is this a complete unattended installation script or it only
> creates the rootfs? If its former, are you sure the name has to be
> 'create-rootfs.sh'? If its latter, I think we'd rather want a script
> that can do a complete installation as thats what the applications
> will expect from these scripts.
This script just creates the rootfs: the rest is supposed to be done by
the containerization.
> 2. The injection-method method isn't the most important feature of
> this patch so I don't think it deserves to be mentioned in the
> shortlog at least. Having said that, would be nice to have some more
> info in the commit log details section.
Well... the attempt with a special injection method (whatever we call it
in the end) it to help filter the install scripts that will apply to
create rootfs for containers. We can either filter by name and assuming
all rootfs creation script will have the same name across distros, or we
can filter on a special injection method.
Depending on what you prefer, I can even drop that new (fake) injection
method.
--
Cedric
> > 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
> >
> > _______________________________________________
> > Libosinfo mailing list
> > Libosinfo at redhat.com
> > https://www.redhat.com/mailman/listinfo/libosinfo
>
>
>
More information about the Libosinfo
mailing list