[Libosinfo] [osinfo-db PATCH 6/6] install-script, ubuntu: Add osinfo-install-successful file

Fabiano Fidêncio fidencio at redhat.com
Fri Jul 19 14:22:11 UTC 2019


Let's create an `osinfo-install-successful` file in /root after we
finish the installation.

Although this may not be totally accurate, it'll help up in the future
to test whether the installation was successful in an automated manner.

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 data/install-script/ubuntu.com/ubuntu-preseed-desktop.xml.in | 4 ++++
 data/install-script/ubuntu.com/ubuntu-preseed-jeos.xml.in    | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/data/install-script/ubuntu.com/ubuntu-preseed-desktop.xml.in b/data/install-script/ubuntu.com/ubuntu-preseed-desktop.xml.in
index 9fd8bcf..f7484f9 100644
--- a/data/install-script/ubuntu.com/ubuntu-preseed-desktop.xml.in
+++ b/data/install-script/ubuntu.com/ubuntu-preseed-desktop.xml.in
@@ -91,6 +91,10 @@ d-i finish-install/reboot_in_progress note
 d-i preseed/early_command string chmod 666 /dev/ttyS0
 ubiquity ubiquity/summary note
 ubiquity ubiquity/reboot boolean true
+
+# Create an osinfo-install-successful file in /root
+d-i preseed/late_command string in-target \
+    touch /root/osinfo-install-successful
                 </xsl:template>
             </xsl:stylesheet>
         </template>
diff --git a/data/install-script/ubuntu.com/ubuntu-preseed-jeos.xml.in b/data/install-script/ubuntu.com/ubuntu-preseed-jeos.xml.in
index af9eb4c..b1edba3 100644
--- a/data/install-script/ubuntu.com/ubuntu-preseed-jeos.xml.in
+++ b/data/install-script/ubuntu.com/ubuntu-preseed-jeos.xml.in
@@ -117,6 +117,10 @@ d-i preseed/late_command string \
 <xsl:if test="os/version = 13.04">
 ubiquity ubiquity/success_command string sed -i 's/eject -p -m.*/& [ "$prompt" ] || return 0/' /etc/init.d/casper
 </xsl:if>
+
+# Create an osinfo-install-successful file in /root
+d-i preseed/late_command string in-target \
+    touch /root/osinfo-install-successful
         </xsl:template>
       </xsl:stylesheet>
     </template>
-- 
2.21.0




More information about the Libosinfo mailing list