--- data/install-scripts/fedora.xml | 136 ++++++++++++++++++++++++++++++++++++++- data/oses/fedora.xml | 2 + 2 files changed, 137 insertions(+), 1 deletion(-) diff --git a/data/install-scripts/fedora.xml b/data/install-scripts/fedora.xml index a1a59fb..db8af34 100644 --- a/data/install-scripts/fedora.xml +++ b/data/install-scripts/fedora.xml @@ -1,4 +1,5 @@ <libosinfo version="0.0.1"> + <!-- JEOS PROFILE --> <install-script id='http://fedoraproject.org/scripts/fedora/jeos'> <profile>jeos</profile> <template> @@ -94,4 +95,137 @@ reboot </template> </install-script> -</libosinfo> \ No newline at end of file + <!-- DESKTOP PROFILE --> + <install-script id='http://fedoraproject.org/scripts/fedora/desktop'> + <profile>desktop</profile> + <template> + <xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + + <xsl:output method="text"/> + + <xsl:template name="disk"> + <xsl:choose> + <xsl:when test="os/version > 9"> + <!-- virtio --> + <xsl:text>vda</xsl:text> + </xsl:when> + <xsl:when test="os/version > 6"> + <!-- libata IDE --> + <xsl:text>sda</xsl:text> + </xsl:when> + <xsl:otherwise> + <!-- IDE --> + <xsl:text>hda</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="rootfs"> + <xsl:choose> + <xsl:when test="os/version > 10"> + <xsl:text>ext4</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>ext3</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="bootfs"> + <xsl:choose> + <xsl:when test="os/version > 11"> + <xsl:text>ext4</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>ext3</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match="/install-script-config"> +# Install script for <xsl:value-of select="os/short-id"/> profile <xsl:value-of select="script/profile"/> +install +keyboard <xsl:value-of select="config/l10n-keyboard"/> +lang <xsl:value-of select="config/l10n-language"/> +<xsl:if test="os/version < 7"> +langsupport --default <xsl:value-of select="config/l10n-language"/> <xsl:value-of select="config/l10n-language"/> +mouse generic3ps/2 --device psaux +</xsl:if> +network --onboot yes --device eth0 --bootproto dhcp --noipv6 --activate +rootpw <xsl:value-of select="config/admin-password"/> +firewall --disabled +authconfig --enableshadow --enablemd5 +<xsl:if test="os/version > 1"> +selinux --enforcing +</xsl:if> +timezone --utc <xsl:value-of select="config/l10n-timezone"/> +bootloader --location=mbr +zerombr <xsl:if test="os/version < 14">yes</xsl:if> + +clearpart --all --drives=<xsl:call-template name="disk"/> + +firstboot --disable + +<xsl:if test="os/version > 15"> +part biosboot --fstype=biosboot --size=1 +</xsl:if> +part /boot --fstype <xsl:call-template name="bootfs"/> --recommended --ondisk=<xsl:call-template name="disk"/> +part pv.2 --size=1 --grow --ondisk=<xsl:call-template name="disk"/> +volgroup VolGroup00 --pesize=32768 pv.2 +logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=768 --grow --maxsize=1536 +logvol / --fstype <xsl:call-template name="rootfs"/> --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow +reboot + +user --name=<xsl:value-of select="config/user-login"/> --password=<xsl:value-of select="config/user-password"/> + +<xsl:if test="os/version < 17"> +repo --name=fedora +repo --name=update +</xsl:if> + +%packages +@base +@core +@hardware-support +@base-x +@gnome-desktop +@graphical-internet +@sound-and-video + +# QXL driver and SPICE vdagent +xorg-x11-drv-qxl +spice-vdagent + +%end + +%post --erroronfail + +# Add user to admin group +usermod -a -G wheel <xsl:value-of select="config/user-login"/> + +# Enable autologin +echo "[daemon] +AutomaticLoginEnable=true +AutomaticLogin=<xsl:value-of select="config/user-login"/> + +[security] + +[xdmcp] + +[greeter] + +[chooser] + +[debug] +" > /etc/gdm/custom.conf + +%end + </xsl:template> + </xsl:stylesheet> + </template> + </install-script> + + +</libosinfo> diff --git a/data/oses/fedora.xml b/data/oses/fedora.xml index 786cbde..87af194 100644 --- a/data/oses/fedora.xml +++ b/data/oses/fedora.xml @@ -1111,6 +1111,7 @@ <installer> <script id='http://fedoraproject.org/scripts/fedora/jeos'/> + <script id='http://fedoraproject.org/scripts/fedora/desktop'/> </installer> </os> @@ -1198,6 +1199,7 @@ <installer> <script id='http://fedoraproject.org/scripts/fedora/jeos'/> + <script id='http://fedoraproject.org/scripts/fedora/desktop'/> </installer> </os> -- 1.7.10.1