Fwd: OpenSuse express installation

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

 



Hey,

I realized that I won't have time to work on openSUSE express
installation in the near future. I just wanted to send you my
preliminary work on this which already worked with openSUSE 13.1 but
not with 13.2 anymore which kept me from submitting the patch. I
wasn't able to investigate that issue further.

But anyways here are the patches in case anyone plans to continue
working on that. I'll be there if any questions arise of course.

Lasse
From bb8d196ac3bd4950bbc5b600057050af52101b73 Mon Sep 17 00:00:00 2001
From: Lasse Schuirmann <lasse.schuirmann@xxxxxxxxx>
Date: Sun, 10 Aug 2014 16:10:32 +0200
Subject: [PATCH 1/2] openSUSE: Add JEOS express installation script

This script should be fully backward compatible to openSUSE until
version 11.0. Since AutoYaST is a very stable and backwards compatible
thing it is secure to offer express installation for future versions so
even users with a more stable distribution can use the express
installation for recent images.

openSUSE does a two-stage installation so we need a reboot during the
installation. The settings in the general section of the script have
been carefully tested so the user gets a usable system right from the
first manual boot.
---
 data/install-scripts/Makefile.am  |   1 +
 data/install-scripts/opensuse.xml | 112 ++++++++++++++++++++++++++++++++++++++
 data/oses/opensuse.xml.in         |  64 ++++++++++++++++------
 3 files changed, 161 insertions(+), 16 deletions(-)
 create mode 100644 data/install-scripts/opensuse.xml

diff --git a/data/install-scripts/Makefile.am b/data/install-scripts/Makefile.am
index 78decc2..c53dc79 100644
--- a/data/install-scripts/Makefile.am
+++ b/data/install-scripts/Makefile.am
@@ -5,6 +5,7 @@ database_DATA =     \
   fedora.xml        \
   rhel.xml          \
   ubuntu.xml        \
+  opensuse.xml      \
   windows-sif.xml   \
   windows-cmd.xml   \
   windows-reg.xml   \
diff --git a/data/install-scripts/opensuse.xml b/data/install-scripts/opensuse.xml
new file mode 100644
index 0000000..4c3d155
--- /dev/null
+++ b/data/install-scripts/opensuse.xml
@@ -0,0 +1,112 @@
+<libosinfo version="0.0.1">
+
+  <!-- JEOS PROFILE -->
+  <install-script id='http://opensuse.org/scripts/opensuse/jeos'>
+    <profile>jeos</profile>
+    <expected-filename>autoinst.xml</expected-filename>
+    <config>
+      <!-- Localization options -->
+      <param name="l10n-keyboard" policy="optional" value-map="http://libosinfo.fedorahosted.org/x11-keyboard"/>
+      <param name="l10n-language" policy="optional"/>
+      <param name="l10n-timezone" policy="optional"/>
+
+      <param name="admin-password" policy="optional"/>
+    </config>
+    <injection-method>initrd</injection-method>
+    <injection-method>cdrom</injection-method>
+    <!-- FIXME: disk injection only works when the floppy isnt inserted as an
+                usb device (with an own partition) or really as a floppy.
+                Providing the injection method would therefore break openSuse
+                express installation in gnome-boxes -->
+    <template>
+      <xsl:stylesheet
+        xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+        version="1.0">
+
+        <xsl:output method="text"/>
+
+        <xsl:template name="l10n-language">
+          <xsl:choose>
+            <xsl:when test="config/l10n-language != '' and config/l10n-language != 'C'">
+              <xsl:value-of select="config/l10n-language"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>en_US</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:template>
+
+        <xsl:template name="l10n-keyboard">
+          <xsl:choose>
+            <xsl:when test="config/l10n-keyboard != '' and config/l10n-keyboard != 'C'">
+              <xsl:value-of select="config/l10n-keyboard"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>us</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:template>
+
+        <xsl:template match="/command-line">
+            <xsl:text> autoyast </xsl:text>
+        </xsl:template>
+
+<xsl:template match="/install-script-config">
+
+&lt;profile xmlns=&quot;http://www.suse.com/1.0/yast2ns&quot; xmlns:config=&quot;http://www.suse.com/1.0/configns&quot;&gt;
+
+  &lt;clock&gt;
+    &lt;hwclock&gt;UTC&lt;/hwclock&gt;
+    &lt;timezone&gt;<xsl:value-of select="config/l10n-timezone"/>&lt;/timezone&gt;
+  &lt;/clock&gt;
+  &lt;keyboard&gt;
+    &lt;keymap&gt;<xsl:value-of select="config/l10n-keyboard"/>&lt;/keymap&gt;
+  &lt;/keyboard&gt;
+  &lt;language&gt;<xsl:value-of select="config/l10n-language"/>&lt;/language&gt;
+
+  &lt;general&gt;
+    &lt;mode&gt;
+      &lt;halt config:type=&quot;boolean&quot;&gt;false&lt;/halt&gt;
+      &lt;forceboot config:type=&quot;boolean&quot;&gt;false&lt;/forceboot&gt;
+      &lt;final_reboot config:type=&quot;boolean&quot;&gt;false&lt;/final_reboot&gt;
+      &lt;final_halt config:type=&quot;boolean&quot;&gt;true&lt;/final_halt&gt;
+      &lt;confirm config:type=&quot;boolean&quot;&gt;false&lt;/confirm&gt;
+    &lt;/mode&gt;
+  &lt;/general&gt;
+
+  &lt;users config:type=&quot;list&quot;&gt;
+    &lt;user&gt;
+      &lt;username&gt;root&lt;/username&gt;
+      &lt;user_password&gt;<xsl:value-of select="config/admin-password"/>&lt;/user_password&gt;
+      &lt;encrypted config:type=&quot;boolean&quot;&gt;false&lt;/encrypted&gt;
+      &lt;forename/&gt;
+      &lt;surname/&gt;
+    &lt;/user&gt;
+  &lt;/users&gt;
+
+  &lt;software&gt;
+    &lt;patterns config:type="list"&gt;
+      &lt;pattern&gt;base&lt;/pattern&gt;
+      &lt;pattern&gt;enhanced_base&lt;/pattern&gt;
+      &lt;pattern&gt;yast2_basis&lt;/pattern&gt;
+    &lt;/patterns&gt;
+  &lt;/software&gt;
+
+  &lt;!-- We need to configure pam to accept login with an empty password. --&gt;
+  &lt;scripts&gt;
+    &lt;init-scripts config:type=&quot;list&quot;&gt;
+      &lt;script&gt;
+        &lt;source&gt;
+          pam-config -a --unix-nullok
+        &lt;/source&gt;
+      &lt;/script&gt;
+    &lt;/init-scripts&gt;
+  &lt;/scripts&gt;
+
+&lt;/profile&gt;
+
+</xsl:template>
+      </xsl:stylesheet>
+    </template>
+  </install-script>
+</libosinfo>
diff --git a/data/oses/opensuse.xml.in b/data/oses/opensuse.xml.in
index 1c89d00..644f60f 100644
--- a/data/oses/opensuse.xml.in
+++ b/data/oses/opensuse.xml.in
@@ -68,7 +68,7 @@
     <upgrades id="http://opensuse.org/opensuse/11.2"; />
     <derives-from id="http://opensuse.org/opensuse/11.2"; />
 
-    <media arch="i686">
+    <media arch="i686" installer-reboots="2">
       <url>http://download.opensuse.org/distribution/11.3/iso/openSUSE-11.3-DVD-i586.iso</url>
       <iso>
         <volume-id>openSUSE-DVD-i586-Build0702..001</volume-id>
@@ -78,7 +78,7 @@
       <kernel>boot/i386/loader/linux</kernel>
       <initrd>boot/i386/loader/initrd</initrd>
     </media>
-    <media arch="x86_64">
+    <media arch="x86_64" installer-reboots="2">
       <url>http://download.opensuse.org/distribution/11.3/iso/openSUSE-11.3-DVD-x86_64.iso</url>
       <iso>
         <volume-id>openSUSE-DVD-x86_64.0702..001</volume-id>
@@ -110,6 +110,10 @@
       <initrd>boot/x86_64/loader/initrd</initrd>
     </media>
 
+    <installer>
+      <script id='http://opensuse.org/scripts/opensuse/jeos' />
+    </installer>
+
     <resources arch="all">
       <minimum>
         <cpu>500000000</cpu>
@@ -134,7 +138,7 @@
     <upgrades id="http://opensuse.org/opensuse/11.3"; />
     <derives-from id="http://opensuse.org/opensuse/11.3"; />
 
-    <media arch="i686">
+    <media arch="i686" installer-reboots="2">
       <url>http://download.opensuse.org/distribution/11.4/iso/openSUSE-11.4-DVD-i586.iso</url>
       <iso>
         <volume-id>openSUSE-DVD-i586-Build0024</volume-id>
@@ -144,7 +148,7 @@
       <kernel>boot/i386/loader/linux</kernel>
       <initrd>boot/i386/loader/initrd</initrd>
     </media>
-    <media arch="x86_64">
+    <media arch="x86_64" installer-reboots="2">
       <url>http://download.opensuse.org/distribution/11.4/iso/openSUSE-11.4-DVD-x86_64.iso</url>
       <iso>
         <volume-id>openSUSE-DVD-x86_640024</volume-id>
@@ -176,6 +180,10 @@
       <initrd>boot/x86_64/loader/initrd</initrd>
     </media>
 
+    <installer>
+      <script id='http://opensuse.org/scripts/opensuse/jeos' />
+    </installer>
+
     <resources arch="all">
       <minimum>
         <cpu>500000000</cpu>
@@ -200,7 +208,7 @@
     <upgrades id="http://opensuse.org/opensuse/11.4"; />
     <derives-from id="http://opensuse.org/opensuse/11.4"; />
 
-    <media arch="i686">
+    <media arch="i686" installer-reboots="2">
       <url>http://download.opensuse.org/distribution/12.1/iso/openSUSE-12.1-DVD-i586.iso</url>
       <iso>
         <volume-id>openSUSE-DVD-i586-Build0039</volume-id>
@@ -210,7 +218,7 @@
       <kernel>boot/i386/loader/linux</kernel>
       <initrd>boot/i386/loader/initrd</initrd>
     </media>
-    <media arch="x86_64">
+    <media arch="x86_64" installer-reboots="2">
       <url>http://download.opensuse.org/distribution/12.1/iso/openSUSE-12.1-DVD-x86_64.iso</url>
       <iso>
         <volume-id>openSUSE-DVD-x86_640039</volume-id>
@@ -242,6 +250,10 @@
       <initrd>boot/x86_64/loader/initrd</initrd>
     </media>
 
+    <installer>
+      <script id='http://opensuse.org/scripts/opensuse/jeos' />
+    </installer>
+
     <resources arch="all">
       <minimum>
         <cpu>500000000</cpu>
@@ -267,7 +279,7 @@
     <upgrades id="http://opensuse.org/opensuse/12.1"; />
     <derives-from id="http://opensuse.org/opensuse/12.1"; />
 
-    <media arch="i686">
+    <media arch="i686" installer-reboots="2">
       <url>http://download.opensuse.org/distribution/12.2/iso/openSUSE-12.2-DVD-i586.iso</url>
       <iso>
         <volume-id>openSUSE-DVD-i586-Build0167</volume-id>
@@ -277,7 +289,7 @@
       <kernel>boot/i386/loader/linux</kernel>
       <initrd>boot/i386/loader/initrd</initrd>
     </media>
-    <media arch="x86_64">
+    <media arch="x86_64" installer-reboots="2">
       <url>http://download.opensuse.org/distribution/12.2/iso/openSUSE-12.2-DVD-x86_64.iso</url>
       <iso>
         <volume-id>openSUSE-DVD-x86_640167</volume-id>
@@ -309,6 +321,10 @@
       <initrd>boot/x86_64/loader/initrd</initrd>
     </media>
 
+    <installer>
+      <script id='http://opensuse.org/scripts/opensuse/jeos' />
+    </installer>
+
     <resources arch="all">
       <minimum>
         <cpu>500000000</cpu>
@@ -334,7 +350,7 @@
     <upgrades id="http://opensuse.org/opensuse/12.2"; />
     <derives-from id="http://opensuse.org/opensuse/12.2"; />
 
-    <media arch="i686">
+    <media arch="i686" installer-reboots="2">
       <url>http://download.opensuse.org/distribution/12.3/iso/openSUSE-12.3-DVD-i586.iso</url>
       <iso>
         <volume-id>openSUSE-12.3-DVD</volume-id>
@@ -344,7 +360,7 @@
       <kernel>boot/i386/loader/linux</kernel>
       <initrd>boot/i386/loader/initrd</initrd>
     </media>
-    <media arch="x86_64">
+    <media arch="x86_64" installer-reboots="2">
       <url>http://download.opensuse.org/distribution/12.3/iso/openSUSE-12.3-DVD-x86_64.iso</url>
       <iso>
         <volume-id>openSUSE-12.3-DVD-x86_64</volume-id>
@@ -355,6 +371,10 @@
       <initrd>boot/x86_64/loader/initrd</initrd>
     </media>
 
+    <installer>
+      <script id='http://opensuse.org/scripts/opensuse/jeos' />
+    </installer>
+
     <resources arch="all">
     <!-- http://en.opensuse.org/Hardware_requirements -->
       <minimum>
@@ -381,7 +401,7 @@
     <upgrades id="http://opensuse.org/opensuse/12.3"; />
     <derives-from id="http://opensuse.org/opensuse/12.3"; />
 
-    <media arch="i686">
+    <media arch="i686" installer-reboots="2">
       <url>http://download.opensuse.org/distribution/13.1/iso/openSUSE-13.1-DVD-i586.iso</url>
       <iso>
         <volume-id>openSUSE-13.1-DVD</volume-id>
@@ -391,7 +411,7 @@
       <kernel>boot/i386/loader/linux</kernel>
       <initrd>boot/i386/loader/initrd</initrd>
     </media>
-    <media arch="x86_64">
+    <media arch="x86_64" installer-reboots="2">
       <url>http://download.opensuse.org/distribution/13.1/iso/openSUSE-13.1-DVD-x86_64.iso</url>
       <iso>
         <volume-id>openSUSE-13.1-DVD-x86_64</volume-id>
@@ -425,6 +445,10 @@
       <initrd>boot/x86_64/loader/initrd</initrd>
     </media>
 
+    <installer>
+      <script id='http://opensuse.org/scripts/opensuse/jeos' />
+    </installer>
+
     <resources arch="all">
     <!-- http://en.opensuse.org/Hardware_requirements -->
       <minimum>
@@ -456,7 +480,7 @@
     <derives-from id="http://opensuse.org/opensuse/13.1"; />
     <release-status>prerelease</release-status>
 
-    <media arch="i686">
+    <media arch="i686" installer-reboots="2">
       <iso>
         <volume-id>openSUSE-([1-9][4-9]\.[0-9]+|13\.[2-9])-DVD</volume-id>
         <system-id>LINUX</system-id>
@@ -465,7 +489,7 @@
       <kernel>boot/i386/loader/linux</kernel>
       <initrd>boot/i386/loader/initrd</initrd>
     </media>
-    <media arch="x86_64">
+    <media arch="x86_64" installer-reboots="2">
       <iso>
         <volume-id>openSUSE-([1-9][4-9]\.[0-9]+|13\.[2-9])-DVD-x86_64</volume-id>
         <system-id>LINUX</system-id>
@@ -475,6 +499,10 @@
       <initrd>boot/x86_64/loader/initrd</initrd>
     </media>
 
+    <installer>
+      <script id='http://opensuse.org/scripts/opensuse/jeos' />
+    </installer>
+
     <resources arch="all">
     <!-- http://en.opensuse.org/Hardware_requirements -->
       <minimum>
@@ -502,7 +530,7 @@
     <derives-from id="http://opensuse.org/opensuse/13.1"; />
     <release-status>snapshot</release-status>
 
-    <media arch="i686">
+    <media arch="i686" installer-reboots="2">
       <iso>
         <volume-id>openSUSE-.*-DVD-Snapshot.*</volume-id>
         <system-id>LINUX</system-id>
@@ -511,7 +539,7 @@
       <kernel>boot/i386/loader/linux</kernel>
       <initrd>boot/i386/loader/initrd</initrd>
     </media>
-    <media arch="x86_64">
+    <media arch="x86_64" installer-reboots="2">
       <iso>
         <volume-id>openSUSE-.*-DVD-x86_64-Snapshot.*</volume-id>
         <system-id>LINUX</system-id>
@@ -521,6 +549,10 @@
       <initrd>boot/x86_64/loader/initrd</initrd>
     </media>
 
+    <installer>
+      <script id='http://opensuse.org/scripts/opensuse/jeos' />
+    </installer>
+
     <resources arch="all">
     <!-- http://en.opensuse.org/Hardware_requirements -->
       <minimum>
-- 
2.1.0

From 8fc582453bdbeb6778be8ce70864527232ab714c Mon Sep 17 00:00:00 2001
From: Lasse Schuirmann <lasse.schuirmann@xxxxxxxxx>
Date: Sat, 29 Nov 2014 12:11:18 +0100
Subject: [PATCH 2/2] opensuse add desktop script

---
 data/install-scripts/opensuse.xml | 180 ++++++++++++++++++++++++++++++++++++++
 data/oses/opensuse.xml.in         |   8 ++
 2 files changed, 188 insertions(+)

diff --git a/data/install-scripts/opensuse.xml b/data/install-scripts/opensuse.xml
index 4c3d155..973c8bf 100644
--- a/data/install-scripts/opensuse.xml
+++ b/data/install-scripts/opensuse.xml
@@ -109,4 +109,184 @@
       </xsl:stylesheet>
     </template>
   </install-script>
+
+  <!-- DESKTOP PROFILE -->
+  <install-script id='http://opensuse.org/scripts/opensuse/desktop'>
+    <profile>desktop</profile>
+    <expected-filename>autoinst.xml</expected-filename>
+    <config>
+      <!-- Localization options -->
+      <param name="l10n-keyboard" policy="optional" value-map="http://libosinfo.fedorahosted.org/x11-keyboard"/>
+      <param name="l10n-language" policy="optional"/>
+      <param name="l10n-timezone" policy="optional"/>
+
+      <!-- Network options -->
+      <param name="hostname" policy="optional"/>
+      <param name="domain" policy="optional"/>
+
+      <!-- Account options -->
+      <param name="admin-password" policy="optional"/>
+      <param name="user-fullname" policy="optional"/>
+      <param name="user-login" policy="required"/>
+      <param name="user-password" policy="required"/>
+      <param name="avatar-location" policy="optional"/>TODO
+      <param name="avatar-disk" policy="optional"/>TODO
+    </config>
+    <injection-method>initrd</injection-method>
+    <injection-method>cdrom</injection-method>
+    <!-- FIXME: disk injection only works when the floppy isnt inserted as an
+                usb device (with an own partition) or really as a floppy.
+                Providing the injection method would therefore break openSuse
+                express installation in gnome-boxes -->
+    <avatar-format>
+      <mime-type>image/png</mime-type>
+    </avatar-format>
+    <template>
+      <xsl:stylesheet
+        xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+        version="1.0">
+
+        <xsl:output method="text"/>
+
+        <xsl:template name="l10n-language">
+          <xsl:choose>
+            <xsl:when test="config/l10n-language != '' and config/l10n-language != 'C'">
+              <xsl:value-of select="config/l10n-language"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>en_US</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:template>
+
+        <xsl:template name="l10n-keyboard">
+          <xsl:choose>
+            <xsl:when test="config/l10n-keyboard != '' and config/l10n-keyboard != 'C'">
+              <xsl:value-of select="config/l10n-keyboard"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>us</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:template>
+
+        <xsl:template match="/command-line">
+            <xsl:text> autoyast </xsl:text>
+        </xsl:template>
+
+<xsl:template match="/install-script-config">
+
+&lt;profile xmlns=&quot;http://www.suse.com/1.0/yast2ns&quot; xmlns:config=&quot;http://www.suse.com/1.0/configns&quot;&gt;
+
+  &lt;clock&gt;
+    &lt;hwclock&gt;UTC&lt;/hwclock&gt;
+    &lt;timezone&gt;<xsl:value-of select="config/l10n-timezone"/>&lt;/timezone&gt;
+  &lt;/clock&gt;
+  &lt;keyboard&gt;
+    &lt;keymap&gt;<xsl:value-of select="config/l10n-keyboard"/>&lt;/keymap&gt;
+  &lt;/keyboard&gt;
+  &lt;language&gt;<xsl:value-of select="config/l10n-language"/>&lt;/language&gt;
+
+  &lt;general&gt;
+    &lt;mode&gt;
+      &lt;halt config:type=&quot;boolean&quot;&gt;false&lt;/halt&gt;
+      &lt;final_reboot config:type=&quot;boolean&quot;&gt;false&lt;/final_reboot&gt;
+      &lt;final_halt config:type=&quot;boolean&quot;&gt;true&lt;/final_halt&gt;
+      &lt;confirm config:type=&quot;boolean&quot;&gt;false&lt;/confirm&gt;
+    &lt;/mode&gt;
+  &lt;/general&gt;
+
+  &lt;networking&gt;
+    &lt;dns&gt;
+      &lt;domain&gt;<xsl:value-of select="config/domain"/>&lt;/domain&gt;
+      &lt;hostname&gt;<xsl:value-of select="config/hostname"/>&lt;/hostname&gt;
+    &lt;/dns&gt;
+  &lt;/networking&gt;
+
+  &lt;users config:type=&quot;list&quot;&gt;
+    &lt;user&gt;
+      &lt;username&gt;root&lt;/username&gt;
+      &lt;user_password&gt;<xsl:value-of select="config/admin-password"/>&lt;/user_password&gt;
+      &lt;encrypted config:type=&quot;boolean&quot;&gt;false&lt;/encrypted&gt;
+      &lt;forename/&gt;
+      &lt;surname/&gt;
+    &lt;/user&gt;
+    &lt;user&gt;
+      &lt;username&gt;<xsl:value-of select="config/user-login"/>&lt;/username&gt;
+      &lt;user_password&gt;<xsl:value-of select="config/user-password"/>&lt;/user_password&gt;
+      &lt;encrypted config:type=&quot;boolean&quot;&gt;false&lt;/encrypted&gt;
+      &lt;forename/&gt;
+      &lt;surname/&gt;
+      &lt;fullname&gt;<xsl:value-of select="config/user-fullname"/>&lt;/fullname&gt;
+    &lt;/user&gt;
+  &lt;/users&gt;
+
+  &lt;software&gt;
+    &lt;patterns config:type="list"&gt;
+      &lt;pattern&gt;base&lt;/pattern&gt;
+      &lt;pattern&gt;enhanced_base&lt;/pattern&gt;
+      &lt;pattern&gt;yast2_basis&lt;/pattern&gt;
+      &lt;pattern&gt;x11&lt;/pattern&gt;
+      &lt;pattern&gt;gnome&lt;/pattern&gt;
+      &lt;pattern&gt;gnome_office&lt;/pattern&gt;
+      &lt;pattern&gt;gnome_internet&lt;/pattern&gt;
+      &lt;pattern&gt;gnome_basis&lt;/pattern&gt;
+      &lt;pattern&gt;print_server&lt;/pattern&gt;
+      &lt;pattern&gt;fonts&lt;/pattern&gt;
+    &lt;/patterns&gt;
+    &lt;packages config:type="list"&gt;
+      &lt;package&gt;gdm&lt;/package&gt;
+    &lt;/packages&gt;
+  &lt;/software&gt;
+
+  &lt;scripts&gt;
+    &lt;chroot-scripts config:type=&quot;list&quot;&gt;
+      &lt;script&gt;
+        &lt;chrooted config:type=&quot;boolean&quot;&gt;true&lt;/chrooted&gt;
+        &lt;source&gt;
+          # We need to configure pam to accept login with an empty password.
+          pam-config -a --unix-nullok
+          pam-config -a --nullok
+
+          <xsl:choose>
+          <xsl:when test="config/user-password != ''">
+          useradd <xsl:value-of select='config/user-login'/>
+          passwd -d <xsl:value-of select='config/user-login'/>
+          </xsl:when>
+          </xsl:choose>
+
+          <xsl:choose>
+          <xsl:when test="config/avatar-location != ''">
+          # Set user avatar
+          mkdir /mnt/unattended-media
+          mount <xsl:value-of select='config/avatar-disk'/> /mnt/unattended-media
+          cp /mnt/unattended-media<xsl:value-of select="config/avatar-location"/> /var/lib/AccountsService/icons/<xsl:value-of select="config/user-login"/>
+          umount /mnt/unattended-media
+
+          echo "
+[User]
+Language=
+XSession=
+Icon=/var/lib/AccountsService/icons/<xsl:value-of select="config/user-login"/>
+" >> /var/lib/AccountsService/users/<xsl:value-of select="config/user-login"/>
+          </xsl:when>
+          </xsl:choose>
+
+          # Set gdm as display manager to avoid the ugly default logon screen
+          sed -i 's,DISPLAYMANAGER_XSERVER="Xorg",DISPLAYMANAGER_XSERVER="gdm",' \
+            /etc/sysconfig/displaymanager
+          sed -i 's,DISPLAYMANAGER="",DISPLAYMANAGER="gdm",' \
+            /etc/sysconfig/displaymanager
+
+        &lt;/source&gt;
+      &lt;/script&gt;
+    &lt;/chroot-scripts&gt;
+  &lt;/scripts&gt;
+
+&lt;/profile&gt;
+
+</xsl:template>
+      </xsl:stylesheet>
+    </template>
+  </install-script>
 </libosinfo>
diff --git a/data/oses/opensuse.xml.in b/data/oses/opensuse.xml.in
index 644f60f..1d7fa2b 100644
--- a/data/oses/opensuse.xml.in
+++ b/data/oses/opensuse.xml.in
@@ -112,6 +112,7 @@
 
     <installer>
       <script id='http://opensuse.org/scripts/opensuse/jeos' />
+      <script id='http://opensuse.org/scripts/opensuse/desktop' />
     </installer>
 
     <resources arch="all">
@@ -182,6 +183,7 @@
 
     <installer>
       <script id='http://opensuse.org/scripts/opensuse/jeos' />
+      <script id='http://opensuse.org/scripts/opensuse/desktop' />
     </installer>
 
     <resources arch="all">
@@ -252,6 +254,7 @@
 
     <installer>
       <script id='http://opensuse.org/scripts/opensuse/jeos' />
+      <script id='http://opensuse.org/scripts/opensuse/desktop' />
     </installer>
 
     <resources arch="all">
@@ -323,6 +326,7 @@
 
     <installer>
       <script id='http://opensuse.org/scripts/opensuse/jeos' />
+      <script id='http://opensuse.org/scripts/opensuse/desktop' />
     </installer>
 
     <resources arch="all">
@@ -373,6 +377,7 @@
 
     <installer>
       <script id='http://opensuse.org/scripts/opensuse/jeos' />
+      <script id='http://opensuse.org/scripts/opensuse/desktop' />
     </installer>
 
     <resources arch="all">
@@ -447,6 +452,7 @@
 
     <installer>
       <script id='http://opensuse.org/scripts/opensuse/jeos' />
+      <script id='http://opensuse.org/scripts/opensuse/desktop' />
     </installer>
 
     <resources arch="all">
@@ -501,6 +507,7 @@
 
     <installer>
       <script id='http://opensuse.org/scripts/opensuse/jeos' />
+      <script id='http://opensuse.org/scripts/opensuse/desktop' />
     </installer>
 
     <resources arch="all">
@@ -551,6 +558,7 @@
 
     <installer>
       <script id='http://opensuse.org/scripts/opensuse/jeos' />
+      <script id='http://opensuse.org/scripts/opensuse/desktop' />
     </installer>
 
     <resources arch="all">
-- 
2.1.0

_______________________________________________
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