[Replicant] [vendor_replicant-scripts] [PATCH] modem: fix user interface

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Wed Jul 22 17:51:40 UTC 2020


The modem user interface is the following, according to the help:
    Usage: modem.sh [on|off]
    Examples:
    modem.sh off
    |-> disable the modem
        and reboot
    modem.sh on
    |-> enable the modem
        and reboot

However the code is still expecting the "enable" or "disable" arguments.

This fix the code to use the new "on" and "off" arguments as expected.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 networking/modem/device-files/modem.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/networking/modem/device-files/modem.sh b/networking/modem/device-files/modem.sh
index b27aadd..1a68748 100755
--- a/networking/modem/device-files/modem.sh
+++ b/networking/modem/device-files/modem.sh
@@ -81,12 +81,12 @@ modem()
 	echo "Remounting system partition as writable..."
 	mount -o rw,remount /system
 
-	if [ "${command}" = "enable" ] ; then
+	if [ "${command}" = "on" ] ; then
 		echo "Enabling RIL..."
 		mv /system/lib/libsamsung-ril.so.disabled \
 		   /system/lib/libsamsung-ril.so || \
 		   echo 'RIL was already enabled.'
-	elif [ "${command}" = "disable" ] ; then
+	elif [ "${command}" = "off" ] ; then
 		echo "Disabling RIL..."
 		mv /system/lib/libsamsung-ril.so \
 		   /system/lib/libsamsung-ril.so.disabled || \
-- 
2.27.0



More information about the Replicant mailing list