modem-manager: support a defaults file in the init script
PATCH v2 1/1 modem-manager: support a defaults file in the init script
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).
---
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(-)
package/modem-manager/S44modem-manager +4 -1
@@ -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() {
Signature · 1 line
2.14.3
PATCH v2 1/1 modem-manager: support a defaults file in the init script
Hi Carlos,
Quoted 19 lines
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_ARGSvariable. This is simpler than overriding the whole startup script (e.g. by means of a rootfs overlay).Signed-off-by Carlos Santos <[email protected]>---
Changesv1->v2
- Rebase after commitef0b7e7521(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(-)package/modem-manager/S44modem-manager +0
-0
package/modem-manager/S44modem-manager line 8
Quoted 6 lines
package/modem-manager/S44modem-manager +3
-0@@ -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 ?
package/modem-manager/S44modem-manager line 15
Quoted 8 lines
package/modem-manager/S44modem-manager +1
-1PIDFILE=/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.
package/modem-manager/S44modem-manager line 18
Quoted 3 lines
package/modem-manager/S44modem-manager +0
-0[ $? = 0 ] && echo "OK" || echo "FAIL" } stop() {
Kind regards,
Petr
PATCH v2 1/1 modem-manager: support a defaults file in the init script
Quoted 32 lines
From: "Petr Vorel" <[email protected]>
To: "Carlos Santos" <[email protected]>
Cc: "buildroot" <[email protected]>, "Yegor Yefremov" <[email protected]>, "Aleksander Morgado" <[email protected]>
Sent: Saturday, April 21, 2018 10:19:40 AM
Subject: Re: [PATCH v2] modem-manager: support a defaults file in the init scriptHi Carlos,
Quoted 21 lines
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_ARGSvariable. This is simpler than overriding the whole startup script (e.g. by means of a rootfs overlay).Signed-off-by Carlos Santos <[email protected]>---
Changesv1->v2
- Rebase after commitef0b7e7521(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(-)package/modem-manager/S44modem-manager +0
-0@@ -3,13 +3,16 @@ # Starts ModemManager
Quoted 4 lines
package/modem-manager/S44modem-manager line 8
Quoted 3 lines
package/modem-manager/S44modem-manager +3
-0+# 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.
Quoted 17 lines
package/modem-manager/S44modem-manager line 15
Quoted 8 lines
package/modem-manager/S44modem-manager +1
-1PIDFILE=/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_ARGSLGTM.
package/modem-manager/S44modem-manager line 18
Quoted 3 lines
package/modem-manager/S44modem-manager +0
-0[ $? = 0 ] && echo "OK" || echo "FAIL" } stop() {Kind regards,
Petr
Signature · 4 lines
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
PATCH v2 1/1 modem-manager: support a defaults file in the init script
Hi Carlos,
Quoted 23 lines
Quoted 21 lines
Quoted 21 lines
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_ARGSvariable. This is simpler than overriding the whole startup script (e.g. by means of a rootfs overlay).Signed-off-by Carlos Santos <[email protected]>---
Changesv1->v2
- Rebase after commitef0b7e7521(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(-)package/modem-manager/S44modem-manager +0
-0@@ -3,13 +3,16 @@ # Starts ModemManager
Quoted 7 lines
Quoted 4 lines
package/modem-manager/S44modem-manager line 8
Quoted 3 lines
package/modem-manager/S44modem-manager +3
-0+# 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.
Kind regards,
Petr
Quoted 13 lines
Quoted 13 lines
package/modem-manager/S44modem-manager line 15
Quoted 8 lines
package/modem-manager/S44modem-manager +1
-1PIDFILE=/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_ARGSLGTM.
Quoted 3 lines
package/modem-manager/S44modem-manager +0
-0[ $? = 0 ] && echo "OK" || echo "FAIL" } stop() {
Thomas Petazzoni
AppliedPATCH v2 1/1 modem-manager: support a defaults file in the init script
In reply to Carlos SantosHello,
Quoted 5 lines · Carlos Santos
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_ARGSvariable. This is simpler than overriding the whole startup script (e.g. by means of a rootfs overlay).
Quoted 8 lines
Signed-off-by Carlos Santos <[email protected]>---
Changesv1->v2
- Rebase after commitef0b7e7521(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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com