[PATCH 1/2] debian: Add jeos install-script (version >= 5)

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

 



script based on: https://github.com/clalancette/oz/tree/master/oz/auto
---
 data/install-scripts/Makefile.am |  1 +
 data/install-scripts/debian.xml  | 78 ++++++++++++++++++++++++++++++++++++++++
 data/oses/debian.xml.in          |  8 +++++
 3 files changed, 87 insertions(+)
 create mode 100644 data/install-scripts/debian.xml

diff --git a/data/install-scripts/Makefile.am b/data/install-scripts/Makefile.am
index cb24e09..b916f64 100644
--- a/data/install-scripts/Makefile.am
+++ b/data/install-scripts/Makefile.am
@@ -1,6 +1,7 @@
 
 databasedir = $(pkgdatadir)/db/install-scripts/
 database_DATA =     \
+  debian.xml        \
   fedora.xml        \
   windows-sif.xml   \
   windows-cmd.xml   \
diff --git a/data/install-scripts/debian.xml b/data/install-scripts/debian.xml
new file mode 100644
index 0000000..67b1e3f
--- /dev/null
+++ b/data/install-scripts/debian.xml
@@ -0,0 +1,78 @@
+<libosinfo version="0.0.1">
+  <!-- JEOS PROFILE -->
+  <install-script id='http://fedoraproject.org/scripts/debian/jeos'>
+    <profile>jeos</profile>
+    <expected-filename>preseed,cfg</expected-filename>
+    <config>
+      <param name="admin-password" policy="required"/>
+      <param name="l10n-keyboard" policy="optional"/>
+      <param name="l10n-language" policy="optional"/>
+      <param name="l10n-timezone" policy="optional"/>
+    </config>
+    <template>
+      <xsl:stylesheet
+        xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+        version="1.0">
+
+        <xsl:output method="text"/>
+
+        <xsl:template name="keyboard-from-language">
+          <xsl:variable name="locale">
+            <xsl:choose>
+              <xsl:when test="contains(config/l10n-language,'.')">
+                <xsl:value-of select="substring-before(config/l10n-language,'.')"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="config/l10n-language"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:variable>
+          <xsl:value-of select="substring-after($locale,'_')"/>
+        </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"/>
+
+d-i debian-installer/locale select <xsl:value-of select="config/l10n-language"/>
+d-i console-setup/ask_detect boolean false
+d-i console-setup/layoutcode string <xsl:call-template name="keyboard-from-language"/>
+
+d-i netcfg/choose_interface select auto
+d-i netcfg/get_hostname string <xsl:value-of select="config/hostname"/>
+d-i netcfg/get_domain string localdomain
+d-i netcfg/disable_dhcp boolean false
+d-i mirror/http/proxy string
+d-i netcfg/wireless_wep string
+
+d-i clock-setup/utc boolean true
+d-i time/zone select <xsl:value-of select="config/l10n-timezone"/>
+
+d-i partman-auto/method string regular
+d-i partman-auto/choose_recipe select home
+d-i partman/confirm_write_new_label boolean true
+d-i partman/choose_partition select finish
+d-i partman/confirm boolean true
+d-i partman/confirm_nooverwrite boolean true
+
+d-i passwd/root-login boolean true
+d-i passwd/make-user boolean false
+d-i passwd/root-password password <xsl:value-of select="config/admin-password"/>
+d-i passwd/root-password-again password <xsl:value-of select="config/admin-password"/>
+
+tasksel tasksel/first multiselect standard
+
+d-i grub-installer/only_debian boolean true
+d-i grub-installer/with_other_os boolean true
+
+d-i apt-setup/security_host string
+d-i apt-setup/services-select multiselect
+d-i apt-setup/volatile_host string
+d-i apt-setup/security_host string
+
+d-i finish-install/reboot_in_progress note
+	</xsl:template>
+      </xsl:stylesheet>
+    </template>
+  </install-script>
+
+</libosinfo>
diff --git a/data/oses/debian.xml.in b/data/oses/debian.xml.in
index 67f27a9..96ad89a 100644
--- a/data/oses/debian.xml.in
+++ b/data/oses/debian.xml.in
@@ -136,6 +136,10 @@
         <storage>5368709120</storage>
       </recommended>
     </resources>
+
+    <installer>
+      <script id='http://fedoraproject.org/scripts/debian/jeos'/>
+    </installer>
   </os>
 
   <os id="http://debian.org/debian/6";>
@@ -196,6 +200,10 @@
         <system-id>LINUX</system-id>
       </iso>
     </media>
+
+    <installer>
+      <script id='http://fedoraproject.org/scripts/debian/jeos'/>
+    </installer>
   </os>
 
 <!-- Wheezy isn't released yet
-- 
1.8.0.2

_______________________________________________
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