summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorStew Benedict <stewb@mandriva.org>2001-07-18 15:54:47 +0000
committerStew Benedict <stewb@mandriva.org>2001-07-18 15:54:47 +0000
commit4239729f41a697b744609b24993e756ec48a1303 (patch)
treef580e59394e46ecb529d65cec9c35911bf244292 /perl-install/detect_devices.pm
parent51b0ae8285a511e53be6f27fbaff0825d8a1c8c2 (diff)
downloaddrakx-4239729f41a697b744609b24993e756ec48a1303.tar
drakx-4239729f41a697b744609b24993e756ec48a1303.tar.gz
drakx-4239729f41a697b744609b24993e756ec48a1303.tar.bz2
drakx-4239729f41a697b744609b24993e756ec48a1303.tar.xz
drakx-4239729f41a697b744609b24993e756ec48a1303.zip
roll back some changes from PPC beta - OldWorld vs NewWorld bootloader
modem detection on ttyS0, new sound module in 2.4.4
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm20
1 files changed, 17 insertions, 3 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 4afe2a120..81a106098 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -54,9 +54,23 @@ sub IDEburners { grep { $_->{type} eq 'cdrom' && isBurner($_) } getIDE() }
sub dvdroms { grep { $_->{type} eq 'cdrom' && isDvdDrive($_) } get() }
sub get_mac_model() {
- my $mac_model = cat_("/proc/device-tree/model") || die "Can't open /proc/device-tree/model";
- log::l("Mac model: $mac_model");
- $mac_model;
+ my $mac_model = cat_("/proc/device-tree/model") || die "Can't open /proc/device-tree/model";
+ log::l("Mac model: $mac_model");
+ $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";
}
sub floppies() {