From 5b27d8408c4bcdf31b5c0356097fc9ca66cf1c9d Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Mon, 14 Sep 2020 17:17:03 -0600 Subject: [PATCH] config file: don't print warning if config file cannot be opened --- dist/ifupdown-ng.conf.example | 10 ++++++++++ libifupdown/config-file.c | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 dist/ifupdown-ng.conf.example diff --git a/dist/ifupdown-ng.conf.example b/dist/ifupdown-ng.conf.example new file mode 100644 index 0000000..1e5443c --- /dev/null +++ b/dist/ifupdown-ng.conf.example @@ -0,0 +1,10 @@ +# This is an example configuration file for ifupdown-ng, which allows +# the system administrator to configure the behaviour of ifupdown-ng. +# +# The settings specified here are the defaults of ifupdown-ng. + +# allow_addon_scripts: +# Enable support for /etc/if-X.d addon scripts. These are used for +# compatibility with legacy setups, and may be disabled for performance +# improvements in setups where only ifupdown-ng executors are used. +allow_addon_scripts = 1 diff --git a/libifupdown/config-file.c b/libifupdown/config-file.c index 7f2b299..1844875 100644 --- a/libifupdown/config-file.c +++ b/libifupdown/config-file.c @@ -52,8 +52,10 @@ lif_config_load(const char *filename) if (fd == NULL) { +#if 0 fprintf(stderr, "ifupdown-ng: cannot open config %s: %s\n", filename, strerror(errno)); +#endif return false; }