summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-20 15:58:57 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-20 15:58:57 +0000
commit9536d08153ea7d840c8e7dc44eeecaf090180015 (patch)
treed02670213617d7c3b392d74263011e8941a318c4
parent424a5e2cf9a77d8e29aba7e56e6928c14b919c04 (diff)
downloaddraklive-install-9536d08153ea7d840c8e7dc44eeecaf090180015.tar
draklive-install-9536d08153ea7d840c8e7dc44eeecaf090180015.tar.gz
draklive-install-9536d08153ea7d840c8e7dc44eeecaf090180015.tar.bz2
draklive-install-9536d08153ea7d840c8e7dc44eeecaf090180015.tar.xz
draklive-install-9536d08153ea7d840c8e7dc44eeecaf090180015.zip
sync /var/log in installed root when needed
-rwxr-xr-xdraklive-install9
1 files changed, 9 insertions, 0 deletions
diff --git a/draklive-install b/draklive-install
index 4282234..53d89c4 100755
--- a/draklive-install
+++ b/draklive-install
@@ -175,6 +175,10 @@ sub get_total_size {
$total{$source} = first(split(/\s+/, `du -sbx $source 2>/dev/null`));
}
+sub sync_logs() {
+ cp_af('/var/log', $::prefix . '/var');
+}
+
sub copy_root {
my ($in, $copy_source) = @_;
my $total = get_total_size($in, $copy_source);
@@ -199,6 +203,7 @@ sub copy_root {
$in->ask_warn(N("Error"), N("Unable to copy files to new root"));
$in->exit(1);
}
+ sync_logs();
}
sub complete_install {
@@ -250,6 +255,8 @@ sub complete_install {
# enable back some disabled services
require services;
services::start_service_on_boot($_) foreach qw(dkms crond);
+
+ sync_logs();
}
sub setup_bootloader {
@@ -259,10 +266,12 @@ sub setup_bootloader {
any::setupBootloaderBeforeStandalone($in->do_pkgs, $bootloader, $all_hds, $fstab);
local $::Wizard_no_previous = 0;
any::setupBootloaderUntilInstalled($in, $bootloader, $all_hds, $fstab, $ENV{SECURE_LEVEL});
+ sync_logs();
}
sub finish_installation {
my ($fstab) = @_;
+ sync_logs();
#- cleanly umount here, it will avoid fs journals to be corrupted after a hackish reboot
umount_all($fstab);
}