summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2020-05-05 17:43:04 +0200
committerQuentin Carbonneaux <quentin@c9x.me>2020-05-06 23:30:38 +0200
commit7055aabf7d1a2929f7189cf37cb44e94b62d00a4 (patch)
tree1ad6815520f6379b410f0cccf57e517aff915e1f /src
parent725b0bd3faa5f9c4417c71097e4fb01608f5f953 (diff)
downloaddhcpcd-7055aabf7d1a2929f7189cf37cb44e94b62d00a4.tar.xz
Do not report an error if control_group is already set
Diffstat (limited to 'src')
-rw-r--r--src/if-options.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/if-options.c b/src/if-options.c
index f2fb205b..aa213563 100644
--- a/src/if-options.c
+++ b/src/if-options.c
@@ -2120,7 +2120,8 @@ invalid_token:
return -1;
}
if (grp == NULL) {
- logerrx("controlgroup: %s: not found", arg);
+ if (!ctx->control_group)
+ logerrx("controlgroup: %s: not found", arg);
free(p);
return -1;
}
@@ -2129,7 +2130,8 @@ invalid_token:
#else
grp = getgrnam(arg);
if (grp == NULL) {
- logerrx("controlgroup: %s: not found", arg);
+ if (!ctx->control_group)
+ logerrx("controlgroup: %s: not found", arg);
return -1;
}
ctx->control_group = grp->gr_gid;