summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-06 21:09:36 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-06 21:09:36 +0000
commit78a6a2c2496a9fb29d7af2d92b2d1a6254802e3a (patch)
tree21062b98eb0ac7b06823a7a2a4bbf27924a4f213 /perl-install/bootloader.pm
parent79a34036b86e79ea7f1b4983cce15edaafc932fc (diff)
downloaddrakx-backup-do-not-use-78a6a2c2496a9fb29d7af2d92b2d1a6254802e3a.tar
drakx-backup-do-not-use-78a6a2c2496a9fb29d7af2d92b2d1a6254802e3a.tar.gz
drakx-backup-do-not-use-78a6a2c2496a9fb29d7af2d92b2d1a6254802e3a.tar.bz2
drakx-backup-do-not-use-78a6a2c2496a9fb29d7af2d92b2d1a6254802e3a.tar.xz
drakx-backup-do-not-use-78a6a2c2496a9fb29d7af2d92b2d1a6254802e3a.zip
cleanup get_of_dev (aka ofpath)
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm21
1 files changed, 6 insertions, 15 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 86d370856..6e4651058 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -585,21 +585,12 @@ sub set_profiles {
}
sub get_of_dev {
- my ($unix_dev) = @_;
- #- don't care much for this - need to run ofpath rooted, and I need the result
- #- In test mode, just run on "/", otherwise you can't get to the /proc files
- run_program::rooted_or_die($::prefix, "/usr/sbin/ofpath $unix_dev", ">", "/tmp/ofpath");
- open(FILE, "$::prefix/tmp/ofpath") || die "Can't open $::prefix/tmp/ofpath";
- my $of_dev = "";
- local $_;
- while (<FILE>){
- $of_dev = $_;
- }
- chop($of_dev);
- my @del_file = ($::prefix . "/tmp/ofpath");
- unlink (@del_file);
- log::l("OF Device: $of_dev");
- $of_dev;
+ my ($unix_dev) = @_;
+ my $of_dev;
+ run_program::rooted_or_die($::prefix, "/usr/sbin/ofpath", ">", \$of_dev, $unix_dev);
+ chomp($of_dev);
+ log::l("OF Device: $of_dev");
+ $of_dev;
}
sub install_yaboot {