diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/dhcpleasectl/dhcpleasectl.c | 7 | ||||
-rw-r--r-- | usr.sbin/dhcpleasectl/parser.c | 3 | ||||
-rw-r--r-- | usr.sbin/dhcpleasectl/parser.h | 5 |
3 files changed, 11 insertions, 4 deletions
diff --git a/usr.sbin/dhcpleasectl/dhcpleasectl.c b/usr.sbin/dhcpleasectl/dhcpleasectl.c index 6e397191791..0edabf1ba9e 100644 --- a/usr.sbin/dhcpleasectl/dhcpleasectl.c +++ b/usr.sbin/dhcpleasectl/dhcpleasectl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpleasectl.c,v 1.4 2021/06/16 14:06:18 florian Exp $ */ +/* $OpenBSD: dhcpleasectl.c,v 1.5 2021/07/26 09:26:36 florian Exp $ */ /* * Copyright (c) 2021 Florian Obser <florian@openbsd.org> @@ -115,6 +115,11 @@ main(int argc, char *argv[]) /* Process user request. */ switch (res->action) { + case RELOAD: + imsg_compose(ibuf, IMSG_CTL_RELOAD, 0, 0, -1, NULL, 0); + printf("reload request sent.\n"); + done = 1; + break; case LOG_VERBOSE: verbose = 1; /* FALLTHROUGH */ diff --git a/usr.sbin/dhcpleasectl/parser.c b/usr.sbin/dhcpleasectl/parser.c index eb9a0d88505..c77621eb3ec 100644 --- a/usr.sbin/dhcpleasectl/parser.c +++ b/usr.sbin/dhcpleasectl/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.1 2021/02/26 16:16:37 florian Exp $ */ +/* $OpenBSD: parser.c,v 1.2 2021/07/26 09:26:36 florian Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -61,6 +61,7 @@ static const struct token t_send[]; static const struct token t_send_request[]; static const struct token t_main[] = { + {KEYWORD, "reload", RELOAD, NULL}, {KEYWORD, "show", SHOW, t_show}, {KEYWORD, "log", NONE, t_log}, {KEYWORD, "send", NONE, t_send}, diff --git a/usr.sbin/dhcpleasectl/parser.h b/usr.sbin/dhcpleasectl/parser.h index dad595b313e..4c4a89cd4cf 100644 --- a/usr.sbin/dhcpleasectl/parser.h +++ b/usr.sbin/dhcpleasectl/parser.h @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.h,v 1.1 2021/02/26 16:16:37 florian Exp $ */ +/* $OpenBSD: parser.h,v 1.2 2021/07/26 09:26:36 florian Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -23,7 +23,8 @@ enum actions { LOG_BRIEF, SHOW, SHOW_INTERFACE, - SEND_REQUEST + SEND_REQUEST, + RELOAD }; struct parse_result { |