1 | #!/usr/bin/perl -w
|
---|
2 | #
|
---|
3 | # Subroutines related to Kernel brought by the MondoRescue project
|
---|
4 | #
|
---|
5 | # $Id$
|
---|
6 | #
|
---|
7 | # Copyright B. Cornec 2008-2010
|
---|
8 | # Provided under the GPL v2
|
---|
9 |
|
---|
10 | package MondoRescue::Kernel;
|
---|
11 |
|
---|
12 | use strict 'vars';
|
---|
13 | use Data::Dumper;
|
---|
14 | use lib qw (lib);
|
---|
15 | use ProjectBuilder::Base;
|
---|
16 | use ProjectBuilder::Conf;
|
---|
17 | use MondoRescue::Base;
|
---|
18 | use MondoRescue::Inventory;
|
---|
19 |
|
---|
20 | # Inherit from the "Exporter" module which handles exporting functions.
|
---|
21 |
|
---|
22 | use Exporter;
|
---|
23 |
|
---|
24 | # Export, by default, all the functions into the namespace of
|
---|
25 | # any code which uses this module.
|
---|
26 |
|
---|
27 | our @ISA = qw(Exporter);
|
---|
28 | our @EXPORT = qw(mr_kernel_get_version);
|
---|
29 |
|
---|
30 | =pod
|
---|
31 |
|
---|
32 | =head1 NAME
|
---|
33 |
|
---|
34 | MondoRescue::Kernel, part of the mondorescue.org
|
---|
35 |
|
---|
36 | =head1 DESCRIPTION
|
---|
37 |
|
---|
38 | This modules provides low level functions for Kernel support in the Mondorescue project
|
---|
39 |
|
---|
40 | =head1 USAGE
|
---|
41 |
|
---|
42 | =over 4
|
---|
43 |
|
---|
44 | =item B<mr_kernel_get_version>
|
---|
45 |
|
---|
46 | This function checks the kernel and returns back its version
|
---|
47 |
|
---|
48 | =cut
|
---|
49 |
|
---|
50 | sub mr_kernel_get_version {
|
---|
51 |
|
---|
52 | my ($os,$ver,$kernelver,$rest);
|
---|
53 |
|
---|
54 | # By default we don't know how it works for other OSes
|
---|
55 | $kernelver = "unknown";
|
---|
56 |
|
---|
57 | ($os,$ver,$kernelver,$rest) = split(/ /,$mr_os->{'files'}->{'proc_version'}) if ($mr_os->{'os'} eq "linux");
|
---|
58 |
|
---|
59 | return($kernelver);
|
---|
60 | }
|
---|
61 |
|
---|
62 | =back
|
---|
63 |
|
---|
64 | =head1 WEB SITES
|
---|
65 |
|
---|
66 | The main Web site of the project is available at L<http://www.mondorescue.org/>. Bug reports should be filled using the trac instance of the project at L<http://trac.mondorescue.org/>.
|
---|
67 |
|
---|
68 | =head1 USER MAILING LIST
|
---|
69 |
|
---|
70 | The mailing list of the project is available at L<mailto:mondo@lists.sf.net>
|
---|
71 |
|
---|
72 | =head1 AUTHORS
|
---|
73 |
|
---|
74 | The Mondorescue.org team L<http://www.mondorescue.org/> lead by Bruno Cornec L<mailto:bruno@mondorescue.org>.
|
---|
75 |
|
---|
76 | =head1 COPYRIGHT
|
---|
77 |
|
---|
78 | This module is distributed under the GPL v2.0 license
|
---|
79 | described in the file C<COPYING> included with the distribution.
|
---|
80 |
|
---|
81 | =cut
|
---|
82 |
|
---|
83 | 1;
|
---|
84 |
|
---|