summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStew Benedict <stewb@mandriva.org>2001-03-15 14:53:09 +0000
committerStew Benedict <stewb@mandriva.org>2001-03-15 14:53:09 +0000
commit5dd25e576d6ac8152e44075dfdb229e1337adf14 (patch)
tree8af7a441fceb29adcef885ac73d2ba516667c464
parentb20fa07a463ad522aeee545eecf3fff7dbb65a6f (diff)
downloaddrakx-5dd25e576d6ac8152e44075dfdb229e1337adf14.tar
drakx-5dd25e576d6ac8152e44075dfdb229e1337adf14.tar.gz
drakx-5dd25e576d6ac8152e44075dfdb229e1337adf14.tar.bz2
drakx-5dd25e576d6ac8152e44075dfdb229e1337adf14.tar.xz
drakx-5dd25e576d6ac8152e44075dfdb229e1337adf14.zip
bootloader.pm, detect_devices.pm, install_steps_interactive.pm: changed temporary file read/write per Pixel
-rw-r--r--perl-install/bootloader.pm5
-rw-r--r--perl-install/detect_devices.pm17
-rw-r--r--perl-install/install_steps_interactive.pm8
3 files changed, 12 insertions, 18 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index b7e30f40d..daf37ef60 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -501,12 +501,9 @@ sub install_yaboot($$$) {
}
}
log::l("Installing boot loader...");
- close F;
my $f = "$prefix/tmp/of_boot_dev";
- open F, ">$f" or die "cannot create file: $f";
my $of_dev = get_of_dev($prefix, $lilo->{boot});
- print F "$of_dev";
- close F;
+ output($f, "$of_dev\n");
$::testing and return;
run_program::rooted($prefix, "/sbin/ybin", "2>", "/tmp/.error") or die "ybin failed";
unlink "$prefix/tmp/.error";
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 81c488a9c..d3bdbf8b7 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -55,14 +55,15 @@ sub burners { grep { $_->{type} eq 'cdrom' && isBurner($_->{device}) } get()
sub IDEburners { grep { $_->{type} eq 'cdrom' && isBurner($_->{device}) } getIDE() }
sub get_mac_model() {
- open(FILE, "/proc/device-tree/model") || die "Can't open /proc/device-tree/model";
- my $mac_model = "";
- local $_ = "";
- while (<FILE>){
- $mac_model = $_;
- }
- close(FILE);
- chop($mac_model);
+# open(FILE, "/proc/device-tree/model") || die "Can't open /proc/device-tree/model";
+# my $mac_model = "";
+# local $_ = "";
+# while (<FILE>){
+# $mac_model = $_;
+# }
+# close(FILE);
+ my $mac_model = cat_("/proc/device-tree/model") || die "Can't open /proc/device-tree/model";
+# chop($mac_model);
log::l("Mac model: $mac_model");
$mac_model;
}
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index a8fe951b7..f344e5caa 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -962,12 +962,8 @@ try to force installation even if that destroys the first partition?"));
unlink "$o->{prefix}/tmp/.error";
die "already displayed";
} elsif (arch() =~ /ppc/) {
- open(FILE, "$o->{prefix}/tmp/of_boot_dev") || die "Can't open $o->{prefix}/tmp/of_boot_dev";
- my $of_boot = "";
- local $_ = "";
- while (<FILE>){
- $of_boot = $_;
- }
+ my $of_boot = cat_("$o->{prefix}/tmp/of_boot_dev") || die "Can't open $o->{prefix}/tmp/of_boot_dev";
+ chop($of_boot);
unlink "$o->{prefix}/tmp/.error";
$o->ask_warn('', _("You will need to change your Open Firmware boot-device to\n enable the bootloader. Hold down Command-Option-O-F\n at reboot and enter:\n setenv boot-device $of_boot,\\ofboot.b\n Then type: shut-down\nAt your next boot you should see the bootloader prompt."));
}