[Libosinfo] [osinfo-db PATCH 08/15] install-script, opensuse, desktop: Add avatar-disk template
Fabiano Fidêncio
fidencio at redhat.com
Thu Jun 13 11:48:27 UTC 2019
Let's add the avatar disk template, which considers that the avatar file
is stored together with the install scripts files, so we don't actually
require the apps to set it (but, if they do, the value set will be
used).
Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
.../opensuse.org/opensuse-autoyast-desktop.xml.in | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/data/install-script/opensuse.org/opensuse-autoyast-desktop.xml.in b/data/install-script/opensuse.org/opensuse-autoyast-desktop.xml.in
index dfbe176..38e2c92 100644
--- a/data/install-script/opensuse.org/opensuse-autoyast-desktop.xml.in
+++ b/data/install-script/opensuse.org/opensuse-autoyast-desktop.xml.in
@@ -49,6 +49,19 @@
</xsl:choose>
</xsl:template>
+ <!-- The default values of avatar-disk consider the avatar is stored
+ in the same disk as the installation scripts. -->
+ <xsl:template name="avatar-disk">
+ <xsl:choose>
+ <xsl:when test="config/avatar-disk != ''">
+ <xsl:value-of select="config/avatar-disk"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>/dev/sda</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
<xsl:template name="l10n-language">
<xsl:choose>
<xsl:when test="config/l10n-language != '' and config/l10n-language != 'C'">
@@ -269,7 +282,7 @@ fi
if test -n '<xsl:value-of select="config/avatar-location"/>'; then
# Set user avatar
mkdir /mnt/unattended-media
-mount <xsl:value-of select='config/avatar-disk'/> /mnt/unattended-media
+mount <xsl:call-template name="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
--
2.21.0
More information about the Libosinfo
mailing list