summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm12
1 files changed, 1 insertions, 11 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 2f303200d..f0456bdc7 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -763,17 +763,7 @@ sub get_mac_model() {
}
sub get_mac_generation() {
- my $generation = cat_("/proc/cpuinfo") || die "Can't open /proc/cpuinfo";
- my @genarray = split(/\n/, $generation);
- my $count = 0;
- while ($count <= @genarray) {
- if ($genarray[$count] =~ /pmac-generation/) {
- @genarray = split(/:/, $genarray[$count]);
- return $genarray[1];
- }
- $count++;
- }
- return "Unknown Generation";
+ cat_('/proc/cpuinfo') =~ /^pmac-generation\s*:\s*(.*)/m ? $1 : "Unknown Generation";
}
sub hasSMP() {