diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-03-04 18:37:03 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-03-19 15:19:56 +0100 |
commit | 9cf7219d554f73c014b9c6efde7965384d8346ec (patch) | |
tree | 6e47c9cfa2813676a6cc72230e83036024eb2b2d /config.c | |
parent | 047a1ee7680e9a668896a12e2773d6544669d0e9 (diff) |
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 <mschiffer@universe-factory.net>
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 { |