diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-09-05 08:36:17 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-09-05 08:36:17 +0000 |
commit | 03f3b7743eb58b6415a6dc32ae37fe466f534216 (patch) | |
tree | 1035901093c9f889a3f27e82fcd705ad45b1269b /perl-install/bootloader.pm | |
parent | d19692fa29e24940e037cf32ad8d76741fa6d087 (diff) | |
download | drakx-backup-do-not-use-03f3b7743eb58b6415a6dc32ae37fe466f534216.tar drakx-backup-do-not-use-03f3b7743eb58b6415a6dc32ae37fe466f534216.tar.gz drakx-backup-do-not-use-03f3b7743eb58b6415a6dc32ae37fe466f534216.tar.bz2 drakx-backup-do-not-use-03f3b7743eb58b6415a6dc32ae37fe466f534216.tar.xz drakx-backup-do-not-use-03f3b7743eb58b6415a6dc32ae37fe466f534216.zip |
- bootloader-config:
o --action migrate-to-uuids: backup conf file prior to migration with suffix
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r-- | perl-install/bootloader.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 49a68ffa5..f3e52a741 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1312,7 +1312,7 @@ sub make_label_lilo_compatible { } sub write_lilo { - my ($bootloader, $all_hds) = @_; + my ($bootloader, $all_hds, $o_backup_extension) = @_; $bootloader->{prompt} ||= $bootloader->{timeout}; my $file2fullname = sub { @@ -1430,7 +1430,7 @@ sub write_lilo { my $f = arch() =~ /ia64/ ? "$::prefix/boot/efi/elilo.conf" : "$::prefix/etc/lilo.conf"; log::l("writing lilo config to $f"); - renamef($f, "$f.old"); + renamef($f, $f . ($o_backup_extension || '.old')); output_with_perm($f, $bootloader->{password} ? 0600 : 0644, map { "$_\n" } @conf); } @@ -1627,7 +1627,7 @@ sub update_copy_in_boot { } sub write_grub { - my ($bootloader, $all_hds) = @_; + my ($bootloader, $all_hds, $o_backup_extension) = @_; my $fstab = [ fs::get::fstab($all_hds) ]; my @legacy_floppies = detect_devices::floppies(); @@ -1730,14 +1730,14 @@ sub write_grub { } my $f = "$::prefix/boot/grub/menu.lst"; log::l("writing grub config to $f"); - renamef($f, "$f.old"); + renamef($f, $f . ($o_backup_extension || '.old')); output($f, map { "$_\n" } @conf); } { my $f = "$::prefix/boot/grub/install.sh"; my $boot_dev = device_string2grub($bootloader->{boot}, \@legacy_floppies, \@sorted_hds); my $files_dev = device2grub(fs::get::root_($fstab, 'boot'), \@sorted_hds); - renamef($f, "$f.old"); + renamef($f, $f . ($o_backup_extension || '.old')); output_with_perm($f, 0755, "grub --device-map=/boot/grub/device.map --batch <<EOF root $files_dev |