mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
Use AC_PATH_PROG to search for dmidecode
This is useful in certain circumstances, for example when libvirtd is being executed by FreeBSD rc script, it cannot find dmidecode installed from FreeBSD ports because it doesn't have /usr/local (default prefix for ports) in PATH.
This commit is contained in:
parent
bad1cbe1b8
commit
881c6c0047
@ -391,6 +391,8 @@ dnl External programs that we can use if they are available.
|
|||||||
dnl We will hard-code paths to these programs unless we cannot
|
dnl We will hard-code paths to these programs unless we cannot
|
||||||
dnl detect them, in which case we'll search for the program
|
dnl detect them, in which case we'll search for the program
|
||||||
dnl along the $PATH at runtime and fail if it's not there.
|
dnl along the $PATH at runtime and fail if it's not there.
|
||||||
|
AC_PATH_PROG([DMIDECODE], [dmidecode], [dmidecode],
|
||||||
|
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
||||||
AC_PATH_PROG([DNSMASQ], [dnsmasq], [dnsmasq],
|
AC_PATH_PROG([DNSMASQ], [dnsmasq], [dnsmasq],
|
||||||
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
||||||
AC_PATH_PROG([RADVD], [radvd], [radvd],
|
AC_PATH_PROG([RADVD], [radvd], [radvd],
|
||||||
@ -408,6 +410,8 @@ AC_PATH_PROG([OVSVSCTL], [ovs-vsctl], [ovs-vsctl],
|
|||||||
AC_PATH_PROG([SCRUB], [scrub], [scrub],
|
AC_PATH_PROG([SCRUB], [scrub], [scrub],
|
||||||
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED([DMIDECODE],["$DMIDECODE"],
|
||||||
|
[Location or name of the dmidecode program])
|
||||||
AC_DEFINE_UNQUOTED([DNSMASQ],["$DNSMASQ"],
|
AC_DEFINE_UNQUOTED([DNSMASQ],["$DNSMASQ"],
|
||||||
[Location or name of the dnsmasq program])
|
[Location or name of the dnsmasq program])
|
||||||
AC_DEFINE_UNQUOTED([RADVD],["$RADVD"],
|
AC_DEFINE_UNQUOTED([RADVD],["$RADVD"],
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
VIR_ENUM_IMPL(virSysinfo, VIR_SYSINFO_LAST,
|
VIR_ENUM_IMPL(virSysinfo, VIR_SYSINFO_LAST,
|
||||||
"smbios");
|
"smbios");
|
||||||
|
|
||||||
static const char *sysinfoDmidecode = "dmidecode";
|
static const char *sysinfoDmidecode = DMIDECODE;
|
||||||
static const char *sysinfoSysinfo = "/proc/sysinfo";
|
static const char *sysinfoSysinfo = "/proc/sysinfo";
|
||||||
static const char *sysinfoCpuinfo = "/proc/cpuinfo";
|
static const char *sysinfoCpuinfo = "/proc/cpuinfo";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user