diff options
author | Stew Benedict <stewb@mandriva.org> | 2001-03-09 14:10:33 +0000 |
---|---|---|
committer | Stew Benedict <stewb@mandriva.org> | 2001-03-09 14:10:33 +0000 |
commit | 9a5e98cf6025c295f96a3d0239c160520bb1fec9 (patch) | |
tree | d7eae865a1e9210f16c0270d5e809fc9f5dcbdca | |
parent | 6b0613af8c90dc4eb630d1e33d3c8689560b83ad (diff) | |
download | drakx-9a5e98cf6025c295f96a3d0239c160520bb1fec9.tar drakx-9a5e98cf6025c295f96a3d0239c160520bb1fec9.tar.gz drakx-9a5e98cf6025c295f96a3d0239c160520bb1fec9.tar.bz2 drakx-9a5e98cf6025c295f96a3d0239c160520bb1fec9.tar.xz drakx-9a5e98cf6025c295f96a3d0239c160520bb1fec9.zip |
routine to detect MacIntosh model code
-rw-r--r-- | perl-install/detect_devices.pm | 13 |
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") }; |