diff options
author | Justin Stephenson <jstephen@redhat.com> | 2016-08-26 15:15:32 -0400 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2016-09-12 10:23:33 +0200 |
commit | 632fc5d8991d167eea20769c823163551c3f1d8c (patch) | |
tree | 2fb02d96fb3449483565124d663eca7bd45bc094 /src/monitor | |
parent | fedfb7c62b4efa89d18d0d3a7895a2a34ec4ce42 (diff) | |
download | sssd-632fc5d8991d167eea20769c823163551c3f1d8c.tar.gz sssd-632fc5d8991d167eea20769c823163551c3f1d8c.tar.xz sssd-632fc5d8991d167eea20769c823163551c3f1d8c.zip |
MONITOR: Remove --disable-netlink command-line option
Removing monitor command-line option, to be superceded by
sssd.conf option
Reviewed-by: Petr Cech <pcech@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/monitor')
-rw-r--r-- | src/monitor/monitor.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 1f89c5a79..442bdbc42 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -2041,8 +2041,7 @@ static void missing_resolv_conf(struct tevent_context *ev, } static int monitor_process_init(struct mt_ctx *ctx, - const char *config_file, - bool opt_netlinkoff) + const char *config_file) { TALLOC_CTX *tmp_ctx; struct tevent_signal *tes; @@ -2173,14 +2172,12 @@ static int monitor_process_init(struct mt_ctx *ctx, return ret; } - if (opt_netlinkoff == false) { - ret = setup_netlink(ctx, ctx->ev, network_status_change_cb, - ctx, &ctx->nlctx); - if (ret != EOK) { - DEBUG(SSSDBG_OP_FAILURE, - "Cannot set up listening for network notifications\n"); - return ret; - } + ret = setup_netlink(ctx, ctx->ev, network_status_change_cb, + ctx, &ctx->nlctx); + if (ret != EOK) { + DEBUG(SSSDBG_OP_FAILURE, + "Cannot set up listening for network notifications\n"); + return ret; } /* start providers */ @@ -2488,7 +2485,8 @@ int main(int argc, const char *argv[]) _("Become a daemon (default)"), NULL }, \ {"interactive", 'i', POPT_ARG_NONE, &opt_interactive, 0, \ _("Run interactive (not a daemon)"), NULL}, \ - {"disable-netlink", '\0', POPT_ARG_NONE, &opt_netlinkoff, 0, \ + {"disable-netlink", '\0', POPT_ARG_NONE | POPT_ARGFLAG_DOC_HIDDEN, + &opt_netlinkoff, 0, \ _("Disable netlink interface"), NULL}, \ {"config", 'c', POPT_ARG_STRING, &opt_config_file, 0, \ _("Specify a non-default config file"), NULL}, \ @@ -2575,6 +2573,15 @@ int main(int argc, const char *argv[]) config_file = talloc_strdup(tmp_ctx, SSSD_CONFIG_FILE); } + if (opt_netlinkoff) { + DEBUG(SSSDBG_MINOR_FAILURE, + "Option --disable-netlink has been removed and " + "replaced as a monitor option in sssd.conf\n"); + sss_log(SSS_LOG_ALERT, + "--disable-netlink has been deprecated, tunable option " + "disable_netlink available as replacement(man sssd.conf)"); + } + if (!config_file) { return 6; } @@ -2692,8 +2699,8 @@ int main(int argc, const char *argv[]) monitor->ev = main_ctx->event_ctx; talloc_steal(main_ctx, monitor); - ret = monitor_process_init(monitor, config_file, - opt_netlinkoff); + ret = monitor_process_init(monitor, config_file); + if (ret != EOK) return 3; talloc_free(tmp_ctx); |