From 9cf7219d554f73c014b9c6efde7965384d8346ec Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 4 Mar 2014 18:37:03 +0100 Subject: uci: Allow setting the UCI config path on the command line Add a -c switch which allows setting an alternative UCI path instead of using the libuci default. Signed-off-by: Matthias Schiffer --- config.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config.c') diff --git a/config.c b/config.c index 6784dda..4fe72dc 100644 --- a/config.c +++ b/config.c @@ -190,8 +190,10 @@ config_init_package(const char *config) ctx = uci_alloc_context(); uci_ctx = ctx; + if (config_path) + uci_set_confdir(ctx, config_path); + #ifdef DUMMY_MODE - uci_set_confdir(ctx, "./config"); uci_set_savedir(ctx, "./tmp"); #endif } else { -- cgit v1.2.1