gsm: Fix default file and init script. GSM_RES was missing, and the tests for null...
authorRod Whitby <rod@whitby.id.au>
Sun, 9 Sep 2007 11:57:42 +0000 (11:57 +0000)
committerRod Whitby <rod@whitby.id.au>
Sun, 9 Sep 2007 11:57:42 +0000 (11:57 +0000)
packages/gsm/files/default
packages/gsm/files/gsmd
packages/gsm/libgsmd_svn.bb

index 4b582dd..3c164e8 100644 (file)
@@ -6,6 +6,7 @@ case `cpuinfo_id` in
        "GTA01"|"GTA02")
                GSMD_OPTS="-s 115200 -F"
                GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
+               GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset"
                GSM_DEV="/dev/ttySAC0"
                ;;
        "HTC Apache"|"HTC Blueangel")
@@ -37,6 +38,9 @@ case `cpuinfo_id` in
                # If your GSM device needs to be powered up, uncomment and modify the next line
                #GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
 
+               # If your GSM device then needs to be reset, uncomment and modify the next line
+               #GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset"
+
                # This should be in a common /etc/default/serial, together with
                # BT_DEV and IR_DEV for devices that have those on a serial port
                #GSM_DEV="/dev/ttyS1"
index bc7999e..0ac4698 100644 (file)
@@ -13,10 +13,10 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
 
 case "$1" in
     start)
-        [ -n $GSM_POW ] && ( echo "0" >$GSM_POW; sleep 1 )
-        [ -n $GSM_POW ] && ( echo "1" >$GSM_POW; sleep 1 )
-        [ -n $GSM_RES ] && ( echo "1" >$GSM_RES; sleep 1 )
-        [ -n $GSM_RES ] && ( echo "0" >$GSM_RES; sleep 2 )
+        [ -n "$GSM_POW" ] && ( echo "0" >$GSM_POW; sleep 1 )
+        [ -n "$GSM_POW" ] && ( echo "1" >$GSM_POW; sleep 1 )
+        [ -n "$GSM_RES" ] && ( echo "1" >$GSM_RES; sleep 1 )
+        [ -n "$GSM_RES" ] && ( echo "0" >$GSM_RES; sleep 2 )
 
         echo -n "Starting GSM daemon: "
         start-stop-daemon -S -x /usr/sbin/gsmd -- gsmd -p $GSM_DEV $GSMD_OPTS >/tmp/gsm.log 2>&1 &
@@ -28,7 +28,7 @@ case "$1" in
         fi
         ;;
     stop)
-        [ -n $GSM_POW ] && echo "0" >$GSM_POW
+        [ -n "$GSM_POW" ] && echo "0" >$GSM_POW
 
         echo -n "Stopping GSM daemon: "
         start-stop-daemon -K -x /usr/sbin/gsmd
index 914520a..8044b94 100644 (file)
@@ -4,7 +4,7 @@ LICENSE = "GPL LGPL"
 SECTION = "libs/gsm"
 PROVIDES += "gsmd"
 PV = "0.1+svnr${SRCREV}"
-PR = "r22"
+PR = "r23"
 
 SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=gsm;proto=http \
            file://gsmd \