diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2020-03-16 23:02:20 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2020-03-16 23:02:42 +0000 |
commit | ca13e0c3a823fec4196635dd8d132960b7668ddd (patch) | |
tree | ee99a07acdfc7a21766699f01a87e7a8e662efd5 /draklive-install | |
parent | 8163d8fbba994ea9e096208c09a6f155ae174ebc (diff) | |
download | draklive-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.
Diffstat (limited to 'draklive-install')
-rwxr-xr-x | draklive-install | 26 |
1 files changed, 26 insertions, 0 deletions
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 { |