diff options
Diffstat (limited to 'perl-install/detect_devices.pm')
-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") }; |