source: branches/3.2/MondoRescue/bin/mr-kernel-get-modules @ 3522

Last change on this file since 3522 was 3354, checked in by Bruno Cornec, 5 years ago
  • mr-kernel-get-modules now uses Getopt for parameter management, allowing verbosity increase
  • Fix mr_kernel_get_modules to support depmod version providing relative paths such as on RHEL5
  • Fix mr_kernel_get_modules to support modinfo version withou -k option support, using module full path instead
  • the modlist hash is now having keys being full path module names as a consequence
  • Property svn:executable set to *
File size: 412 bytes
Line 
1#!/usr/bin/perl -w
2
3use strict;
4use POSIX "uname";
5use Data::Dumper;
6use ProjectBuilder::Base;
7use MondoRescue::Kernel;
8use Getopt::Long qw(:config auto_abbrev no_ignore_case);
9
10my %opts;                           # CLI Options
11
12GetOptions(
13        "kernel|k:s" => \$opts{'k'},
14        "verbose|v+" => \$opts{'v'},
15);
16
17$pbdebug = $opts{'v'};
18$pbdebug = 0 if (not defined $pbdebug);
19print join(' ',mr_kernel_get_modules($opts{'k'},@ARGV))."\n";
Note: See TracBrowser for help on using the repository browser.