]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
Debian: Arrange to drop "quiet" from command line of installed system
authorIan Campbell <ian.campbell@citrix.com>
Wed, 7 Oct 2015 14:36:39 +0000 (15:36 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 8 Oct 2015 16:19:29 +0000 (17:19 +0100)
By editing /etc/default/grub in a late command iff it exists.

This will affect ts-debian-{hvm,di}-install as well as
ts-host-install and hence affect guests as well as hosts.

The overall effect is that we will log more upon guest boot as well as
on the initial host boot.

Note that for hosts we also strip the "quiet" when updating grub as
part of ts-xen-install, this code remains (although it won't do so
much now).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/Debian.pm

index 6a23751d7b357d65b96b0700a193dd2c397781c8..f0a02e4458c44699680a4c39752f8c8f0e4785df 100644 (file)
@@ -800,6 +800,19 @@ sub preseed_base ($$$$;@) {
 
     preseed_ssh($ho, $sfx);
 
+    preseed_hook_command($ho, 'late_command', '', <<'END');
+#!/bin/sh
+set -ex
+
+grub=/etc/default/grub
+if [ -f /target$grub ] ; then
+    in-target sed -i \
+        's/^\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)\bquiet\b\(.*"\)$/\1\2/g' \
+        $grub
+    in-target update-grub
+fi
+END
+
     debian_overlays(sub {
        my ($srcdir, $tfilename) = @_;
        preseed_hook_overlay($ho, $sfx, $srcdir, $tfilename);