[Libosinfo] [osinfo-db PATCH 04/15] install-script, silverblue: Add target-disk template
Fabiano Fidêncio
fidencio at redhat.com
Thu Jun 13 11:48:23 UTC 2019
Let's add a target-disk template so we actually can use what apps set
as target-disk, instead of using a hardcoded path to /dev/vda.
With this change we keep not requiring the apps to set this value.
Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
.../silverblue-kickstart-desktop.xml.in | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/data/install-script/fedoraproject.org/silverblue-kickstart-desktop.xml.in b/data/install-script/fedoraproject.org/silverblue-kickstart-desktop.xml.in
index e981184..72ed130 100644
--- a/data/install-script/fedoraproject.org/silverblue-kickstart-desktop.xml.in
+++ b/data/install-script/fedoraproject.org/silverblue-kickstart-desktop.xml.in
@@ -12,6 +12,7 @@
<param name="user-login" policy="required"/>
<param name="user-password" policy="optional"/>
<param name="admin-password" policy="optional"/>
+ <param name="target-disk" policy="optional"/>
<param name="script-disk" policy="optional"/>
</config>
<injection-method>cdrom</injection-method>
@@ -25,6 +26,18 @@
<xsl:output method="text"/>
+ <xsl:template name="target-disk">
+ <xsl:choose>
+ <xsl:when test="config/target-disk != ''">
+ <xsl:value-of select="config/target-disk"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- virtio -->
+ <xsl:text>/dev/vda</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
<xsl:template name="script-disk">
<xsl:variable name="script-disk">
<xsl:choose>
@@ -81,7 +94,7 @@ timezone --utc <xsl:value-of select="config/l10n-timezone"/>
bootloader --location=mbr
zerombr
-clearpart --all --drives=/dev/vda
+clearpart --all --drives=<xsl:call-template name="target-disk"/>
firstboot --disable
--
2.21.0
More information about the Libosinfo
mailing list