From 9a5e98cf6025c295f96a3d0239c160520bb1fec9 Mon Sep 17 00:00:00 2001 From: Stew Benedict Date: Fri, 9 Mar 2001 14:10:33 +0000 Subject: routine to detect MacIntosh model code --- perl-install/detect_devices.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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(){ + $mac_model = $_; + } + close(FILE); + chop($mac_model); + log::l("Mac model: $mac_model"); + $mac_model; +} + sub floppies() { require modules; eval { modules::load("floppy") }; -- cgit v1.2.1