summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorStew Benedict <stewb@mandriva.org>2001-03-09 14:10:33 +0000
committerStew Benedict <stewb@mandriva.org>2001-03-09 14:10:33 +0000
commit9a5e98cf6025c295f96a3d0239c160520bb1fec9 (patch)
treed7eae865a1e9210f16c0270d5e809fc9f5dcbdca /perl-install/detect_devices.pm
parent6b0613af8c90dc4eb630d1e33d3c8689560b83ad (diff)
downloaddrakx-9a5e98cf6025c295f96a3d0239c160520bb1fec9.tar
drakx-9a5e98cf6025c295f96a3d0239c160520bb1fec9.tar.gz
drakx-9a5e98cf6025c295f96a3d0239c160520bb1fec9.tar.bz2
drakx-9a5e98cf6025c295f96a3d0239c160520bb1fec9.tar.xz
drakx-9a5e98cf6025c295f96a3d0239c160520bb1fec9.zip
routine to detect MacIntosh model code
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index ddcbe5e42..a5e5b2ed3 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -54,6 +54,19 @@ sub cdroms() {
sub burners { grep { isBurner($_->{device}) } cdroms() }
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);
+ log::l("Mac model: $mac_model");
+ $mac_model;
+}
+
sub floppies() {
require modules;
eval { modules::load("floppy") };