mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Don't require gawk for a simple print expression
Fedora uses gawk as awk so there's no change and in behavior while Debian/Ubuntu use mawk by default. This was reported by Luca Capello in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636712
This commit is contained in:
parent
83b85e3e8f
commit
2a41bc95b5
@ -84,7 +84,7 @@ static char *ebtables_cmd_path;
|
|||||||
static char *iptables_cmd_path;
|
static char *iptables_cmd_path;
|
||||||
static char *ip6tables_cmd_path;
|
static char *ip6tables_cmd_path;
|
||||||
static char *grep_cmd_path;
|
static char *grep_cmd_path;
|
||||||
static char *gawk_cmd_path;
|
static char *awk_cmd_path;
|
||||||
|
|
||||||
#define PRINT_ROOT_CHAIN(buf, prefix, ifname) \
|
#define PRINT_ROOT_CHAIN(buf, prefix, ifname) \
|
||||||
snprintf(buf, sizeof(buf), "libvirt-%c-%s", prefix, ifname)
|
snprintf(buf, sizeof(buf), "libvirt-%c-%s", prefix, ifname)
|
||||||
@ -586,7 +586,7 @@ static int iptablesLinkIPTablesBaseChain(virBufferPtr buf,
|
|||||||
grep_cmd_path, udchain,
|
grep_cmd_path, udchain,
|
||||||
|
|
||||||
syschain, pos, udchain,
|
syschain, pos, udchain,
|
||||||
gawk_cmd_path,
|
awk_cmd_path,
|
||||||
|
|
||||||
pos,
|
pos,
|
||||||
|
|
||||||
@ -4288,7 +4288,7 @@ ebiptablesDriverInit(bool privileged)
|
|||||||
if (virMutexInit(&execCLIMutex) < 0)
|
if (virMutexInit(&execCLIMutex) < 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
gawk_cmd_path = virFindFileInPath("gawk");
|
awk_cmd_path = virFindFileInPath("awk");
|
||||||
grep_cmd_path = virFindFileInPath("grep");
|
grep_cmd_path = virFindFileInPath("grep");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -4302,9 +4302,9 @@ ebiptablesDriverInit(bool privileged)
|
|||||||
/* make sure tools are available and work */
|
/* make sure tools are available and work */
|
||||||
ebiptablesDriverTestCLITools();
|
ebiptablesDriverTestCLITools();
|
||||||
|
|
||||||
/* ip(6)tables support needs gawk & grep, ebtables doesn't */
|
/* ip(6)tables support needs awk & grep, ebtables doesn't */
|
||||||
if ((iptables_cmd_path != NULL || ip6tables_cmd_path != NULL) &&
|
if ((iptables_cmd_path != NULL || ip6tables_cmd_path != NULL) &&
|
||||||
(!grep_cmd_path || !gawk_cmd_path)) {
|
(!grep_cmd_path || !awk_cmd_path)) {
|
||||||
VIR_ERROR(_("essential tools to support ip(6)tables "
|
VIR_ERROR(_("essential tools to support ip(6)tables "
|
||||||
"firewalls could not be located"));
|
"firewalls could not be located"));
|
||||||
VIR_FREE(iptables_cmd_path);
|
VIR_FREE(iptables_cmd_path);
|
||||||
@ -4326,7 +4326,7 @@ ebiptablesDriverInit(bool privileged)
|
|||||||
static void
|
static void
|
||||||
ebiptablesDriverShutdown(void)
|
ebiptablesDriverShutdown(void)
|
||||||
{
|
{
|
||||||
VIR_FREE(gawk_cmd_path);
|
VIR_FREE(awk_cmd_path);
|
||||||
VIR_FREE(grep_cmd_path);
|
VIR_FREE(grep_cmd_path);
|
||||||
VIR_FREE(ebtables_cmd_path);
|
VIR_FREE(ebtables_cmd_path);
|
||||||
VIR_FREE(iptables_cmd_path);
|
VIR_FREE(iptables_cmd_path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user