From e8e3f86e7c1090f35e6d1651c5e0e4a3a686a8c0 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 18 Mar 2005 12:48:57 +0000 Subject: use renamef instead of rename to create .old conf files --- perl-install/bootloader.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'perl-install') 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 <{new} ne $_->{orig}) { - rename "$::prefix/$_->{file}", "$::prefix/$_->{file}.old"; + renamef("$::prefix/$_->{file}", "$::prefix/$_->{file}.old"); output("$::prefix/$_->{file}", $_->{new}); } } -- cgit v1.2.1