summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-18 12:48:57 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-18 12:48:57 +0000
commite8e3f86e7c1090f35e6d1651c5e0e4a3a686a8c0 (patch)
tree6250e1c0b484c20a1f6017414ec0b48fe2ecd06c /perl-install/bootloader.pm
parent12a9709051a3147b0b313aed1fa749e45d19d85b (diff)
downloaddrakx-e8e3f86e7c1090f35e6d1651c5e0e4a3a686a8c0.tar
drakx-e8e3f86e7c1090f35e6d1651c5e0e4a3a686a8c0.tar.gz
drakx-e8e3f86e7c1090f35e6d1651c5e0e4a3a686a8c0.tar.bz2
drakx-e8e3f86e7c1090f35e6d1651c5e0e4a3a686a8c0.tar.xz
drakx-e8e3f86e7c1090f35e6d1651c5e0e4a3a686a8c0.zip
use renamef instead of rename to create .old conf files
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 96142670a..5c29cbc96 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -964,7 +964,7 @@ sub write_yaboot {
}
my $f = "$::prefix/etc/yaboot.conf";
log::l("writing yaboot config to $f");
- rename $f, "$f.old";
+ renamef($f, "$f.old");
output($f, map { "$_\n" } @conf);
}
@@ -1093,7 +1093,7 @@ sub write_lilo {
my $f = arch() =~ /ia64/ ? "$::prefix/boot/efi/elilo.conf" : "$::prefix/etc/lilo.conf";
log::l("writing lilo config to $f");
- rename $f, "$f.old";
+ renamef($f, "$f.old");
output_with_perm($f, $bootloader->{password} ? 0600 : 0644, map { "$_\n" } @conf);
}
@@ -1177,7 +1177,7 @@ sub read_grub_device_map() {
sub write_grub_device_map {
my ($legacy_floppies, $sorted_hds) = @_;
my $f = "$::prefix/boot/grub/device.map";
- rename $f, "$f.old";
+ renamef($f, "$f.old");
output($f,
(map_index { "(fd$::i) /dev/$_->{device}\n" } @$legacy_floppies),
(map_index { "(hd$::i) /dev/$_->{device}\n" } @$sorted_hds));
@@ -1273,14 +1273,14 @@ sub write_grub {
}
my $f = "$::prefix/boot/grub/menu.lst";
log::l("writing grub config to $f");
- rename $f, "$f.old";
+ renamef($f, "$f.old");
output($f, map { "$_\n" } @conf);
}
{
my $f = "$::prefix/boot/grub/install.sh";
my $dev = device_string2grub($bootloader->{boot}, \@legacy_floppies, \@sorted_hds);
my ($stage1, $stage2, $menu_lst) = map { $file2grub->("/boot/grub/$_") } qw(stage1 stage2 menu.lst);
- rename $f, "$f.old";
+ renamef($f, "$f.old");
output_with_perm("$::prefix/boot/grub/install.sh", 0755,
"grub --device-map=/boot/grub/device.map --batch <<EOF
install $stage1 d $dev $stage2 p $menu_lst
@@ -1369,7 +1369,7 @@ sub update_for_renumbered_partitions {
foreach (values %configs) {
if ($_->{new} ne $_->{orig}) {
- rename "$::prefix/$_->{file}", "$::prefix/$_->{file}.old";
+ renamef("$::prefix/$_->{file}", "$::prefix/$_->{file}.old");
output("$::prefix/$_->{file}", $_->{new});
}
}