search for: check_hostname_unix

Displaying 20 results from an estimated 26 matches for "check_hostname_unix".

2014 Dec 02
0
[PATCH 2/5] inspect_os: Add support for detecting OpenBSD
...EXP (re_openbsd, "^OpenBSD (\\d+|\\?)\\.(\\d+|\\?)", 0) +COMPILE_REGEXP (re_openbsd_duid, "^[0-9a-f]{16}\\.[a-z]", 0) +COMPILE_REGEXP (re_openbsd_dev, "^/dev/(s|w)d([0-9])([a-z])$", 0) static void check_architecture (guestfs_h *g, struct inspect_fs *fs); static int check_hostname_unix (guestfs_h *g, struct inspect_fs *fs); @@ -659,6 +662,55 @@ guestfs___check_netbsd_root (guestfs_h *g, struct inspect_fs *fs) return 0; } +/* The currently mounted device may be an OpenBSD root. */ +int +guestfs___check_openbsd_root (guestfs_h *g, struct inspect_fs *fs) +{ + if (guestfs_is_f...
2014 Dec 03
1
[PATCH 1/4] inspect_os: Add support for detecting OpenBSD
...EXP (re_openbsd, "^OpenBSD (\\d+|\\?)\\.(\\d+|\\?)", 0) +COMPILE_REGEXP (re_openbsd_duid, "^[0-9a-f]{16}\\.[a-z]", 0) +COMPILE_REGEXP (re_openbsd_dev, "^/dev/(s|w)d([0-9])([a-z])$", 0) static void check_architecture (guestfs_h *g, struct inspect_fs *fs); static int check_hostname_unix (guestfs_h *g, struct inspect_fs *fs); @@ -659,6 +662,55 @@ guestfs___check_netbsd_root (guestfs_h *g, struct inspect_fs *fs) return 0; } +/* The currently mounted device may be an OpenBSD root. */ +int +guestfs___check_openbsd_root (guestfs_h *g, struct inspect_fs *fs) +{ + if (guestfs_is_f...
2012 May 22
1
failure to find hostname causing fatal error
Trying to inspect an old OpenSuSE image, which has an empty /etc/HOSTNAME file. This causes check_hostname_unix() in inspect_fs_unix() to return -1 -- causing inspection to fail. Somewhat interestingly, if no files of interest were found, the function would return 0.....which I think doesn't cause problems upstream. It's somewhat related to this closed bug where the fix was to set the return code to...
2014 Sep 23
1
[PATCH] inspect: map Hurd devices, and enable fstab introspection
...s); - /* XXX Check for /etc/fstab. */ + if (guestfs_is_file (g, "/etc/fstab") > 0) { + const char *configfiles[] = { "/etc/fstab", NULL }; + if (inspect_with_augeas (g, fs, configfiles, check_fstab) == -1) + return -1; + } /* Determine hostname. */ if (check_hostname_unix (g, fs) == -1) @@ -1635,6 +1642,22 @@ resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map) if (r == -1) return NULL; } + else if (match3 (g, spec, re_hurd_dev, &type, &disk, &part)) { + /* Hurd disk devices are like /dev/hdNsM, where hdN is the +...
2014 Sep 22
1
[PATCH] inspect: basic Minix support
...+ } else { + return -1; + } + + /* Determine the architecture. */ + check_architecture (g, fs); + + /* TODO: enable fstab inspection once resolve_fstab_device implements + * the proper mapping from the Minix device names to the appliance names + */ + + /* Determine hostname. */ + if (check_hostname_unix (g, fs) == -1) + return -1; + + return 0; +} + static void check_architecture (guestfs_h *g, struct inspect_fs *fs) { @@ -863,6 +908,18 @@ check_hostname_unix (guestfs_h *g, struct inspect_fs *fs) } break; + case OS_TYPE_MINIX: + if (guestfs_is_file (g, "/etc/hostname.fi...
2015 Sep 08
1
[PATCH] inspect: recognize the Frugalware distribution
...v/(l|s)d([0-9])([a-z])$", 0) COMPILE_REGEXP (re_altlinux, " (?:(\\d+)(?:\\.(\\d+)(?:[\\.\\d]+)?)?)\\s+\\((?:[^)]+)\\)$", 0) +COMPILE_REGEXP (re_frugalware, "Frugalware (\\d+)\\.(\\d+)", 0) static void check_architecture (guestfs_h *g, struct inspect_fs *fs); static int check_hostname_unix (guestfs_h *g, struct inspect_fs *fs); @@ -632,6 +633,26 @@ guestfs_int_check_linux_root (guestfs_h *g, struct inspect_fs *fs) if (guestfs_int_parse_major_minor (g, fs) == -1) return -1; } + else if (guestfs_is_file_opts (g, "/etc/frugalware-release", +...
2015 Mar 16
0
[PATCH] inspection: add support for systemd .mount files
...nts (guestfs_h *g, struct inspect_fs *fs); +static int check_systemd_mnt (guestfs_h *g, struct inspect_fs *fs, const char *path); /* Hash structure for uuid->path lookups */ typedef struct md_uuid { @@ -582,6 +585,9 @@ guestfs_int_check_linux_root (guestfs_h *g, struct inspect_fs *fs) if (check_hostname_unix (g, fs) == -1) return -1; + if (check_systemd_mounts (g, fs) == -1) + return -1; + return 0; } @@ -981,6 +987,180 @@ check_hostname_freebsd (guestfs_h *g, struct inspect_fs *fs) } static int +check_systemd_mnt (guestfs_h *g, struct inspect_fs *fs, const char *fname) +{ + CLEAN...
2015 Mar 16
2
[PATCH] RFE: Inspection should support systemd mount units
Adds support for systemd .mount files, uses Augeas to extract mount points. Fixes RHBZ#1113153. Maros Zatko (1): inspection: add support for systemd .mount files src/inspect-fs-unix.c | 240 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 240 insertions(+) -- 1.9.3
2014 Dec 03
0
[PATCH 2/4] Support fstab block device resolution for NetBSD
...EGEXP (re_openbsd_duid, "^[0-9a-f]{16}\\.[a-z]", 0) COMPILE_REGEXP (re_openbsd_dev, "^/dev/(s|w)d([0-9])([a-z])$", 0) +COMPILE_REGEXP (re_netbsd_dev, "^/dev/(l|s)d([0-9])([a-z])$", 0) static void check_architecture (guestfs_h *g, struct inspect_fs *fs); static int check_hostname_unix (guestfs_h *g, struct inspect_fs *fs); @@ -92,7 +93,8 @@ static int check_fstab (guestfs_h *g, struct inspect_fs *fs); static int add_fstab_entry (guestfs_h *g, struct inspect_fs *fs, const char *mountable, const char *mp); static char *resolve_fstab_device (guestfs_h...
2014 Dec 02
0
[PATCH 3/5] Support fstab block device resolution for NetBSD
...EGEXP (re_openbsd_duid, "^[0-9a-f]{16}\\.[a-z]", 0) COMPILE_REGEXP (re_openbsd_dev, "^/dev/(s|w)d([0-9])([a-z])$", 0) +COMPILE_REGEXP (re_netbsd_dev, "^/dev/(l|s)d([0-9])([a-z])$", 0) static void check_architecture (guestfs_h *g, struct inspect_fs *fs); static int check_hostname_unix (guestfs_h *g, struct inspect_fs *fs); @@ -92,7 +93,8 @@ static int check_fstab (guestfs_h *g, struct inspect_fs *fs); static int add_fstab_entry (guestfs_h *g, struct inspect_fs *fs, const char *mountable, const char *mp); static char *resolve_fstab_device (guestfs_h...
2015 Aug 25
2
[PATCH 1/2] inspect: recognize the ALT Linux distribution
.../(s|w)d([0-9])([a-z])$", 0) COMPILE_REGEXP (re_netbsd_dev, "^/dev/(l|s)d([0-9])([a-z])$", 0) +COMPILE_REGEXP (re_altlinux, " (?:(\\d+)(?:\\.(\\d+)(?:[\\.\\d]+)?)?)\\s+\\((?:[^)]+)\\)$", 0) static void check_architecture (guestfs_h *g, struct inspect_fs *fs); static int check_hostname_unix (guestfs_h *g, struct inspect_fs *fs); @@ -414,6 +415,26 @@ guestfs_int_check_linux_root (guestfs_h *g, struct inspect_fs *fs) fs->minor_version = 0; } } + else if (guestfs_is_file_opts (g, "/etc/altlinux-release", + GUESTFS_IS_FILE_OPTS_...
2015 Jun 04
3
[PATCH] Use safe_realloc() in favor of realloc overall.
...+++++++--------------- src/inspect-fs.c | 21 ++++++--------------- 2 files changed, 13 insertions(+), 30 deletions(-) diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index 8ffd85d..c9bbad9 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -90,8 +90,8 @@ static int check_hostname_unix (guestfs_h *g, struct inspect_fs *fs); static int check_hostname_redhat (guestfs_h *g, struct inspect_fs *fs); static int check_hostname_freebsd (guestfs_h *g, struct inspect_fs *fs); static int check_fstab (guestfs_h *g, struct inspect_fs *fs); -static int add_fstab_entry (guestfs_h *g, struct...
2016 Dec 06
3
[PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.
For example, converts "///usr//local//" -> "/usr/local". --- src/inspect-fs-unix.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index a1a757c..0fea9c8 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -89,6 +89,7 @@ static char *resolve_fstab_device
2015 Jun 02
1
[PATCH 2/3] inspection: Add support for CoreOS
...can + * only determine the hostname. All immutable OS files are under a separate + * read-only /usr partition. + */ +int +guestfs_int_check_coreos_root (guestfs_h *g, struct inspect_fs *fs) +{ + fs->type = OS_TYPE_LINUX; + fs->distro = OS_DISTRO_COREOS; + + /* Determine hostname. */ + if (check_hostname_unix (g, fs) == -1) + return -1; + + /* CoreOS does not contain /etc/fstab to determine the mount points. + * Associate this filesystem with the "/" mount point. + */ + if (add_fstab_entry (g, fs, fs->mountable, "/") == -1) + return -1; + + return 0; +} + +/* The curr...
2015 May 29
2
[PATCH 2/3] inspection: Add support for CoreOS
...can + * only determine the hostname. All immutable OS files are under a separate + * read-only /usr partition. + */ +int +guestfs_int_check_coreos_root (guestfs_h *g, struct inspect_fs *fs) +{ + fs->type = OS_TYPE_LINUX; + fs->distro = OS_DISTRO_COREOS; + + /* Determine hostname. */ + if (check_hostname_unix (g, fs) == -1) + return -1; + + /* CoreOS does not contain /etc/fstab to determine the mount points. + * Associate this filesystem with the "/" mount point. + */ + if (add_fstab_entry (g, fs, fs->mountable, "/") == -1) + return -1; + + return 0; +} + +/* The curr...
2014 Nov 28
2
[PATCH] lib: Add COMPILE_REGEXP macro to hide regexp constructors/destructors.
...OMPILE_REGEXP (re_sles_patchlevel, "^PATCHLEVEL = (\\d+)", 0) +COMPILE_REGEXP (re_minix, "^(\\d+)\\.(\\d+)(\\.(\\d+))?", 0) +COMPILE_REGEXP (re_hurd_dev, "^/dev/(h)d(\\d+)s(\\d+)$", 0) static void check_architecture (guestfs_h *g, struct inspect_fs *fs); static int check_hostname_unix (guestfs_h *g, struct inspect_fs *fs); -- 2.1.0
2011 Oct 13
9
[PATCH 1/9] Partially fix --disable-erlang
From: Michael Scherer <misc at zarb.org> Without this, configure will always enable erlang, no matter what argument are passed. Now, we can disable it, even if configure still need the erlang compiler for some obscure reason. --- configure.ac | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 337a3ed..e0bed2f 100644 ---
2017 Jul 21
10
[PATCH v10 00/10] Reimplement inspection in the daemon.
v9 was here: https://www.redhat.com/archives/libguestfs/2017-July/msg00139.html This depends on these three series (the first two being single minor patches): https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html https://www.redhat.com/archives/libguestfs/2017-July/msg00215.html There is no substantive change. I
2017 Jul 17
12
[PATCH v9 00/11] Reimplement inspection in the daemon.
This depends on the patch series "[PATCH 00/27] Reimplement many daemon APIs in OCaml." (https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html) v8 was posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00274.html v9: - I split up the mega-patch into a more reviewable series of smaller, incremental patches. There are some other changes vs v8, but
2017 Aug 09
16
[PATCH v12 00/11] Reimplement inspection in the daemon.
This fixes almost everything. Note that it adds an extra commit which fixes the whole utf8/iconv business. It's probably better to list what isn't fixed: (1) I didn't leave the osinfo code around because I'm still haven't looked too closely at virt-builder-repository. Can't we just fetch this code from the git history when we need it? (2) I didn't change the way