* [Buildroot] [PATCH v2] modem-manager: support a defaults file in the init script
@ 2018-04-21 13:00 Carlos Santos
2018-04-21 13:19 ` Petr Vorel
2018-04-22 21:38 ` Thomas Petazzoni
0 siblings, 2 replies; 5+ messages in thread
From: Carlos Santos @ 2018-04-21 13:00 UTC (permalink / raw)
To: buildroot
Sometimes it is useful to pass some parameters to ModemManager when it
starts (e.g. --log-level). Allow the user add a file with such flags in
a MODEMMANAGER_ARGS variable. This is simpler than overriding the whole
startup script (e.g. by means of a rootfs overlay).
Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
---
Changes v1->v2
- Rebase after commit ef0b7e7521 (modem-manager: don't test if the
binary exists in the init script).
---
package/modem-manager/S44modem-manager | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/package/modem-manager/S44modem-manager b/package/modem-manager/S44modem-manager
index a3f5003aa1..416c1e2ee6 100755
--- a/package/modem-manager/S44modem-manager
+++ b/package/modem-manager/S44modem-manager
@@ -3,13 +3,16 @@
# Starts ModemManager
#
+# Allow a few customizations from a config file
+test -r /etc/default/ModemManager && . /etc/default/ModemManager
+
PIDFILE=/var/run/ModemManager.pid
start() {
printf "Starting ModemManager: "
umask 077
start-stop-daemon -S -q -b -m -p $PIDFILE \
- --exec /usr/sbin/ModemManager
+ --exec /usr/sbin/ModemManager -- $MODEMMANAGER_ARGS
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop() {
--
2.14.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2] modem-manager: support a defaults file in the init script
2018-04-21 13:00 [Buildroot] [PATCH v2] modem-manager: support a defaults file in the init script Carlos Santos
@ 2018-04-21 13:19 ` Petr Vorel
2018-04-21 22:48 ` Carlos Santos
2018-04-22 21:38 ` Thomas Petazzoni
1 sibling, 1 reply; 5+ messages in thread
From: Petr Vorel @ 2018-04-21 13:19 UTC (permalink / raw)
To: buildroot
Hi Carlos,
> Sometimes it is useful to pass some parameters to ModemManager when it
> starts (e.g. --log-level). Allow the user add a file with such flags in
> a MODEMMANAGER_ARGS variable. This is simpler than overriding the whole
> startup script (e.g. by means of a rootfs overlay).
> Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
> ---
> Changes v1->v2
> - Rebase after commit ef0b7e7521 (modem-manager: don't test if the
> binary exists in the init script).
> ---
> package/modem-manager/S44modem-manager | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
> diff --git a/package/modem-manager/S44modem-manager b/package/modem-manager/S44modem-manager
> index a3f5003aa1..416c1e2ee6 100755
> --- a/package/modem-manager/S44modem-manager
> +++ b/package/modem-manager/S44modem-manager
> @@ -3,13 +3,16 @@
> # Starts ModemManager
> +# Allow a few customizations from a config file
> +test -r /etc/default/ModemManager && . /etc/default/ModemManager
> +
Out of curiosity, what is supposed to be in /etc/default/ModemManager ?
> PIDFILE=/var/run/ModemManager.pid
> start() {
> printf "Starting ModemManager: "
> umask 077
> start-stop-daemon -S -q -b -m -p $PIDFILE \
> - --exec /usr/sbin/ModemManager
> + --exec /usr/sbin/ModemManager -- $MODEMMANAGER_ARGS
LGTM.
> [ $? = 0 ] && echo "OK" || echo "FAIL"
> }
> stop() {
Kind regards,
Petr
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2] modem-manager: support a defaults file in the init script
2018-04-21 13:19 ` Petr Vorel
@ 2018-04-21 22:48 ` Carlos Santos
2018-04-22 19:37 ` Petr Vorel
0 siblings, 1 reply; 5+ messages in thread
From: Carlos Santos @ 2018-04-21 22:48 UTC (permalink / raw)
To: buildroot
> From: "Petr Vorel" <petr.vorel@gmail.com>
> To: "Carlos Santos" <casantos@datacom.ind.br>
> Cc: "buildroot" <buildroot@buildroot.org>, "Yegor Yefremov" <yegorslists@googlemail.com>, "Aleksander Morgado"
> <aleksander@aleksander.es>
> Sent: Saturday, April 21, 2018 10:19:40 AM
> Subject: Re: [PATCH v2] modem-manager: support a defaults file in the init script
> Hi Carlos,
>
>> Sometimes it is useful to pass some parameters to ModemManager when it
>> starts (e.g. --log-level). Allow the user add a file with such flags in
>> a MODEMMANAGER_ARGS variable. This is simpler than overriding the whole
>> startup script (e.g. by means of a rootfs overlay).
>
>> Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
>> ---
>> Changes v1->v2
>> - Rebase after commit ef0b7e7521 (modem-manager: don't test if the
>> binary exists in the init script).
>> ---
>> package/modem-manager/S44modem-manager | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>
>> diff --git a/package/modem-manager/S44modem-manager
>> b/package/modem-manager/S44modem-manager
>> index a3f5003aa1..416c1e2ee6 100755
>> --- a/package/modem-manager/S44modem-manager
>> +++ b/package/modem-manager/S44modem-manager
>> @@ -3,13 +3,16 @@
>> # Starts ModemManager
>
>
>> +# Allow a few customizations from a config file
>> +test -r /etc/default/ModemManager && . /etc/default/ModemManager
>> +
> Out of curiosity, what is supposed to be in /etc/default/ModemManager ?
MODEMMANAGER_ARGS="--log-level=DEBUG" is a useful option, possibly
along with --log-file.
>> PIDFILE=/var/run/ModemManager.pid
>
>> start() {
>> printf "Starting ModemManager: "
>> umask 077
>> start-stop-daemon -S -q -b -m -p $PIDFILE \
>> - --exec /usr/sbin/ModemManager
>> + --exec /usr/sbin/ModemManager -- $MODEMMANAGER_ARGS
> LGTM.
>
>> [ $? = 0 ] && echo "OK" || echo "FAIL"
>> }
>> stop() {
>
>
> Kind regards,
> Petr
--
Carlos Santos (Casantos) - DATACOM, P&D
?The greatest triumph that modern PR can offer is the transcendent
success of having your words and actions judged by your reputation,
rather than the other way about.? ? Christopher Hitchens
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2] modem-manager: support a defaults file in the init script
2018-04-21 22:48 ` Carlos Santos
@ 2018-04-22 19:37 ` Petr Vorel
0 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2018-04-22 19:37 UTC (permalink / raw)
To: buildroot
Hi Carlos,
> >> Sometimes it is useful to pass some parameters to ModemManager when it
> >> starts (e.g. --log-level). Allow the user add a file with such flags in
> >> a MODEMMANAGER_ARGS variable. This is simpler than overriding the whole
> >> startup script (e.g. by means of a rootfs overlay).
> >> Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
> >> ---
> >> Changes v1->v2
> >> - Rebase after commit ef0b7e7521 (modem-manager: don't test if the
> >> binary exists in the init script).
> >> ---
> >> package/modem-manager/S44modem-manager | 5 ++++-
> >> 1 file changed, 4 insertions(+), 1 deletion(-)
> >> diff --git a/package/modem-manager/S44modem-manager
> >> b/package/modem-manager/S44modem-manager
> >> index a3f5003aa1..416c1e2ee6 100755
> >> --- a/package/modem-manager/S44modem-manager
> >> +++ b/package/modem-manager/S44modem-manager
> >> @@ -3,13 +3,16 @@
> >> # Starts ModemManager
> >> +# Allow a few customizations from a config file
> >> +test -r /etc/default/ModemManager && . /etc/default/ModemManager
> >> +
> > Out of curiosity, what is supposed to be in /etc/default/ModemManager ?
> MODEMMANAGER_ARGS="--log-level=DEBUG" is a useful option, possibly
> along with --log-file.
Thanks for info, make sense.
Acked-by: Petr Vorel <petr.vorel@gmail.com>
Kind regards,
Petr
> >> PIDFILE=/var/run/ModemManager.pid
> >> start() {
> >> printf "Starting ModemManager: "
> >> umask 077
> >> start-stop-daemon -S -q -b -m -p $PIDFILE \
> >> - --exec /usr/sbin/ModemManager
> >> + --exec /usr/sbin/ModemManager -- $MODEMMANAGER_ARGS
> > LGTM.
> >> [ $? = 0 ] && echo "OK" || echo "FAIL"
> >> }
> >> stop() {
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2] modem-manager: support a defaults file in the init script
2018-04-21 13:00 [Buildroot] [PATCH v2] modem-manager: support a defaults file in the init script Carlos Santos
2018-04-21 13:19 ` Petr Vorel
@ 2018-04-22 21:38 ` Thomas Petazzoni
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2018-04-22 21:38 UTC (permalink / raw)
To: buildroot
Hello,
On Sat, 21 Apr 2018 10:00:10 -0300, Carlos Santos wrote:
> Sometimes it is useful to pass some parameters to ModemManager when it
> starts (e.g. --log-level). Allow the user add a file with such flags in
> a MODEMMANAGER_ARGS variable. This is simpler than overriding the whole
> startup script (e.g. by means of a rootfs overlay).
>
> Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
> ---
> Changes v1->v2
> - Rebase after commit ef0b7e7521 (modem-manager: don't test if the
> binary exists in the init script).
> ---
> package/modem-manager/S44modem-manager | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-04-22 21:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-21 13:00 [Buildroot] [PATCH v2] modem-manager: support a defaults file in the init script Carlos Santos
2018-04-21 13:19 ` Petr Vorel
2018-04-21 22:48 ` Carlos Santos
2018-04-22 19:37 ` Petr Vorel
2018-04-22 21:38 ` Thomas Petazzoni
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.