Last change
on this file since 3553 was 3553, checked in by Bruno Cornec, 8 years ago |
Help Fix #790
- Fix perl functions to handle disk type (MBR vs GPT) on RHEL7 and unify output format
- Adds perl function to list all disks on the system
- Adds perl program to unit test these functions
- which_partition_format now uses mr-disk-type
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Rev | Line | |
---|
[3553] | 1 | #!/usr/bin/perl -w
|
---|
| 2 | #
|
---|
| 3 | # $Id$
|
---|
| 4 | # Copyright B. Cornec 2005-2016
|
---|
| 5 | # Provided under the GPL v2
|
---|
| 6 | #
|
---|
| 7 | # Test mr_disk_list to get the list of all disks
|
---|
| 8 | #
|
---|
| 9 | use strict;
|
---|
| 10 | use Data::Dumper;
|
---|
| 11 | # For pbdebug
|
---|
| 12 | use ProjectBuilder::Base;
|
---|
| 13 | use MondoRescue::Disk;
|
---|
| 14 |
|
---|
| 15 | =pod
|
---|
| 16 |
|
---|
| 17 | =head1 NAME
|
---|
| 18 |
|
---|
| 19 | mr-disk-list lists all the disks on the system
|
---|
| 20 |
|
---|
| 21 | =head1 DESCRIPTION
|
---|
| 22 |
|
---|
| 23 | mr-disk-list lists all the disks on the system
|
---|
| 24 |
|
---|
| 25 | =head1 SYNOPSIS
|
---|
| 26 |
|
---|
| 27 | mr-disk-list
|
---|
| 28 |
|
---|
| 29 | =head1 WEB SITES
|
---|
| 30 |
|
---|
| 31 | 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/>.
|
---|
| 32 |
|
---|
| 33 | =head1 USER MAILING LIST
|
---|
| 34 |
|
---|
| 35 | For community exchanges around MondoRescue please use the list L<http://sourceforge.net/mailarchive/forum.php?forum_name=mondo-devel>
|
---|
| 36 |
|
---|
| 37 | =head1 AUTHORS
|
---|
| 38 |
|
---|
| 39 | The MondoRescue team lead by Bruno Cornec L<mailto:bruno@mondorescue.org>.
|
---|
| 40 |
|
---|
| 41 | =head1 COPYRIGHT
|
---|
| 42 |
|
---|
| 43 | MondoRescue is distributed under the GPL v2.0 license or later,
|
---|
| 44 | described in the file C<COPYING> included with the distribution.
|
---|
| 45 |
|
---|
| 46 | =cut
|
---|
| 47 |
|
---|
| 48 | if ((defined $ARGV[0]) && ($ARGV[0] eq "-v")) {
|
---|
| 49 | shift;
|
---|
| 50 | $pbdebug = 2;
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | my $txt = "";
|
---|
| 54 | my $txt2 = "";
|
---|
| 55 | my @ans;
|
---|
| 56 |
|
---|
| 57 | @ans = mr_disk_list();
|
---|
| 58 | pb_log(0, "The list of disks on this system are: @ans\n");
|
---|
| 59 |
|
---|
| 60 | exit(0);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.