Displaying 9 results from an estimated 9 matches for "_check_for_applications".
2010 Apr 21
2
[PATCH 1/2] Don't die during inspection if initrd doesn't exist
This fixes a problem where inspection would die if grub.conf referenced a
non-existent initrd. Just return an empty initrd instead.
---
perl/lib/Sys/Guestfs/Lib.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm
index 5428b10..b5b3906 100644
--- a/perl/lib/Sys/Guestfs/Lib.pm
+++ b/perl/lib/Sys/Guestfs/Lib.pm
@@
2009 Aug 13
1
[PATCH] Don't assume grub is on a separate boot filesystem
...m | 56 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 54 insertions(+), 2 deletions(-)
diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm
index 72b0f7d..89f2aa6 100644
--- a/perl/lib/Sys/Guestfs/Lib.pm
+++ b/perl/lib/Sys/Guestfs/Lib.pm
@@ -1435,6 +1435,56 @@ sub _check_for_applications
$os->{apps} = \@apps;
}
+# Find the path which needs to be prepended to paths in grub.conf to make them
+# absolute
+sub _find_grub_prefix
+{
+ my ($g, $os) = @_;
+
+ my $fses = $os->{filesystems};
+ die("filesystems undefined") unless(defined($fses));
+
+ # Look...
2009 Jul 31
1
[PATCH] Update incorrect comment in Lib.pm
....pm | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm
index be17a30..bbc583f 100644
--- a/perl/lib/Sys/Guestfs/Lib.pm
+++ b/perl/lib/Sys/Guestfs/Lib.pm
@@ -1342,7 +1342,7 @@ sub inspect_in_detail
_check_for_applications ($g, $os);
_check_for_kernels ($g, $os);
if ($os->{os} eq "linux") {
- _check_for_modprobe_aliases ($g, $os);
+ _find_modprobe_aliases ($g, $os);
_check_for_initrd ($g, $os);
}
}
@@ -1436,16 +1436,14 @@ sub _check_for_kernels
$os->{kernels} = \@kernels;
}
-...
2009 Jul 20
1
[PATCH] Replace 'distrofamily' with feature tags
...;{package_format} = $r->{root}->{package_format}
+ if exists $r->{root}->{package_format};
+ $r->{package_management} = $r->{root}->{package_management}
+ if exists $r->{root}->{package_management};
}
sub _assign_mount_points
@@ -1097,8 +1118,8 @@ sub _check_for_applications
my $osn = $os->{os};
if ($osn eq "linux") {
- my $family = $os->{distrofamily};
- if (defined $family && $family eq "redhat") {
+ my $package_format = $os->{package_format};
+ if (defined $package_format && $package_format eq "rpm")...
2009 Jul 16
1
[PATCH] Differentiate 'distro' and 'distrofamily' in Sys::Guestfs::Lib
...>{osdistro} if exists $r->{root}->{osdistro};
+ $r->{distrofamily} = $r->{root}->{osdistrofamily}
+ if exists $r->{root}->{osdistrofamily};
$r->{version} = $r->{root}->{osversion} if exists $r->{root}->{osversion};
}
@@ -1063,8 +1097,8 @@ sub _check_for_applications
my $osn = $os->{os};
if ($osn eq "linux") {
- my $distro = $os->{distro};
- if (defined $distro && ($distro eq "redhat" || $distro eq "fedora")) {
+ my $family = $os->{distrofamily};
+ if (defined $family && $family eq "redhat&...
2009 Jul 16
1
[REPOST] Differentiate 'distro' and 'distrofamily' in Sys::Guestfs::Lib
I was slightly too quick off the marks with the first patch. This updated patch
modifies all of virt-inspector's output types to take account of distrofamily.
2009 Jul 31
1
[PATCH] Use grub entries to find Linux kernels
...-- a/perl/lib/Sys/Guestfs/Lib.pm
+++ b/perl/lib/Sys/Guestfs/Lib.pm
@@ -1343,7 +1343,6 @@ sub inspect_in_detail
_check_for_kernels ($g, $os);
if ($os->{os} eq "linux") {
_find_modprobe_aliases ($g, $os);
- _check_for_initrd ($g, $os);
}
}
@@ -1392,48 +1391,170 @@ sub _check_for_applications
sub _check_for_kernels
{
- local $_;
- my $g = shift;
- my $os = shift;
+ my ($g, $os) = @_;
- my @kernels;
+ if ($os->{os} eq "linux") {
+ # Iterate over entries in grub.conf, populating $os->{boot}
+ # For every kernel we find, inspect it and...
2009 Aug 03
1
[REPOST] Use grub entries to find Linux kernels
This is a repost of the patch I sent on Friday. I know it was already ACK'd, but
I've changed a fair bit in addition to adding the requested POD. Specifically:
I discovered that augeas's grub lens wasn't returning cmdline the way I
expected. This is fixed.
The kernel package, if known, is output as a property of the kernel.
The XML output of virt-inspector is updated with all
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...1/$2"}) {
+ return ("/dev/$1/$2", $fses->{"/dev/$1/$2"});
+ }
+
+ return () if m{/dev/cdrom};
+
+ warn __x("unknown filesystem {fs}\n", fs => $_);
+ return ();
}
}
@@ -1388,7 +1388,7 @@ sub inspect_in_detail
_check_for_applications ($g, $os);
_check_for_kernels ($g, $os);
if ($os->{os} eq "linux") {
- _find_modprobe_aliases ($g, $os);
+ _find_modprobe_aliases ($g, $os);
}
}
@@ -1402,34 +1402,34 @@ sub _check_for_applications
my $osn = $os->{os};
if ($osn eq "linux")...