summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2020-03-16 23:02:20 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2020-03-16 23:02:42 +0000
commitca13e0c3a823fec4196635dd8d132960b7668ddd (patch)
treeee99a07acdfc7a21766699f01a87e7a8e662efd5
parent8163d8fbba994ea9e096208c09a6f155ae174ebc (diff)
downloaddraklive-install-ca13e0c3a823fec4196635dd8d132960b7668ddd.tar
draklive-install-ca13e0c3a823fec4196635dd8d132960b7668ddd.tar.gz
draklive-install-ca13e0c3a823fec4196635dd8d132960b7668ddd.tar.bz2
draklive-install-ca13e0c3a823fec4196635dd8d132960b7668ddd.tar.xz
draklive-install-ca13e0c3a823fec4196635dd8d132960b7668ddd.zip
Record installer log messages and store in /root/drakx.
-rw-r--r--NEWS2
-rwxr-xr-xdraklive-install26
2 files changed, 28 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 9ef9e88..2b2effb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- record installer log messages and store in /root/drakx
+
2.23
- remove dependency on udisks (mga#24949)
diff --git a/draklive-install b/draklive-install
index 91e350e..10b1190 100755
--- a/draklive-install
+++ b/draklive-install
@@ -22,10 +22,35 @@ use feature qw(state);
use File::Basename;
use ugtk3;
+my $logfile = '/tmp/draklive-install.log';
+{
+ package log;
+
+ my $LOG;
+
+ sub l {
+ if (!$LOG) {
+ open $LOG, '>', $logfile;
+ select((select($LOG), $| = 1)[0]);
+ }
+ print $LOG "* ", @_, "\n";
+ }
+}
+
($::rootwidth, $::rootheight) = (Gtk3::Gdk::Screen::width, Gtk3::Gdk::Screen::height);
$::real_windowwidth = $::rootwidth > 800 ? 750 : 600;
$::real_windowheight = $::rootheight > 600 ? 500 : 400;
+chomp(my $basedev = cat_('/run/mgalive/basedev'));
+if ($basedev) {
+ mkdir_p('/tmp/basedev');
+ log::l(run_program::get_stdout('blkid', '-s', 'LABEL', $basedev));
+ if (system('mount', $basedev, '/tmp/basedev') == 0) {
+ log::l('ISO date: ' . cat_('/tmp/basedev/DATE.txt')) if -e '/tmp/basedev/DATE.txt';
+ system('umount', '/tmp/basedev');
+ }
+}
+
{
use diskdrake::interactive;
package diskdrake::interactive;
@@ -257,6 +282,7 @@ sub get_total_size {
sub sync_logs() {
cp_af('/var/log', $::prefix . '/var');
+ cp_f($logfile, $::prefix . '/root/drakx');
}
sub copy_root {