* [PATCH] Allow configuration file override with environment variable.
@ 2014-03-27 13:08 jussi.pakkanen
2014-03-27 14:53 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: jussi.pakkanen @ 2014-03-27 13:08 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 854 bytes --]
From: Jussi Pakkanen <jussi.pakkanen@canonical.com>
---
plugins/phonesim.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/plugins/phonesim.c b/plugins/phonesim.c
index 918d2eb..e84bbf6 100644
--- a/plugins/phonesim.c
+++ b/plugins/phonesim.c
@@ -1071,7 +1071,7 @@ done:
static int phonesim_init(void)
{
int err;
-
+ char *conf_override = getenv("OFONO_PHONESIM_CONFIG");
err = ofono_modem_driver_register(&phonesim_driver);
if (err < 0)
return err;
@@ -1081,7 +1081,10 @@ static int phonesim_init(void)
ofono_gprs_context_driver_register(&context_driver);
ofono_ctm_driver_register(&ctm_driver);
- parse_config(CONFIGDIR "/phonesim.conf");
+ if (conf_override)
+ parse_config(conf_override);
+ else
+ parse_config(CONFIGDIR "/phonesim.conf");
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Allow configuration file override with environment variable.
2014-03-27 13:08 [PATCH] Allow configuration file override with environment variable jussi.pakkanen
@ 2014-03-27 14:53 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2014-03-27 14:53 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 290 bytes --]
Hi Jussi,
On 03/27/2014 08:08 AM, jussi.pakkanen(a)canonical.com wrote:
> From: Jussi Pakkanen <jussi.pakkanen@canonical.com>
>
> ---
> plugins/phonesim.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
Patch has been applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-27 14:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-27 13:08 [PATCH] Allow configuration file override with environment variable jussi.pakkanen
2014-03-27 14:53 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.