diff options
-rw-r--r-- | generator/generator_actions.ml | 4 | ||||
-rwxr-xr-x | inspector/virt-inspector | 4 | ||||
-rw-r--r-- | src/guestfs-internal.h | 1 | ||||
-rw-r--r-- | src/inspect.c | 10 |
4 files changed, 19 insertions, 0 deletions
diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index 086584ca..4fadd17b 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -787,6 +787,10 @@ Debian or a Debian-derived distro such as Ubuntu. Fedora. +=item \"pardus\" + +Pardus. + =item \"redhat-based\" Some Red Hat-derived distro. diff --git a/inspector/virt-inspector b/inspector/virt-inspector index 87da6219..49360688 100755 --- a/inspector/virt-inspector +++ b/inspector/virt-inspector @@ -385,6 +385,10 @@ sub output_applications $package_format = "rpm"; $package_management = "yum"; } + elsif ($distro eq "pardus") { + $package_format = "pisi"; + $package_management = "pisi"; + } elsif ($distro =~ /redhat/ || $distro =~ /rhel/) { if ($major_version >= 5) { $package_format = "rpm"; diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 10c95038..529aa7d6 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -166,6 +166,7 @@ enum inspect_os_distro { OS_DISTRO_REDHAT_BASED, OS_DISTRO_RHEL, OS_DISTRO_WINDOWS, + OS_DISTRO_PARDUS, }; struct inspect_fs { diff --git a/src/inspect.c b/src/inspect.c index 88f8bb12..8e42408e 100644 --- a/src/inspect.c +++ b/src/inspect.c @@ -722,6 +722,15 @@ check_linux_root (guestfs_h *g, struct inspect_fs *fs) if (parse_major_minor (g, fs) == -1) return -1; } + else if (guestfs_exists (g, "/etc/pardus-release") > 0) { + fs->distro = OS_DISTRO_PARDUS; + + if (parse_release_file (g, fs, "/etc/pardus-release") == -1) + return -1; + + if (parse_major_minor (g, fs) == -1) + return -1; + } /* Determine the architecture. */ const char *binaries[] = @@ -1238,6 +1247,7 @@ guestfs__inspect_get_distro (guestfs_h *g, const char *root) switch (fs->distro) { case OS_DISTRO_DEBIAN: ret = safe_strdup (g, "debian"); break; case OS_DISTRO_FEDORA: ret = safe_strdup (g, "fedora"); break; + case OS_DISTRO_PARDUS: ret = safe_strdup (g, "pardus"); break; case OS_DISTRO_REDHAT_BASED: ret = safe_strdup (g, "redhat-based"); break; case OS_DISTRO_RHEL: ret = safe_strdup (g, "rhel"); break; case OS_DISTRO_WINDOWS: ret = safe_strdup (g, "windows"); break; |