# Loss of connection to AirVantage - only reboot works

**URL:** <https://forum.legato.io/t/loss-of-connection-to-airvantage-only-reboot-works/6651>\
**Category:** Legato Application Framework\
**Created:** [November 30, 2023, 3:51pm UTC](https://forum.legato.io/t/loss-of-connection-to-airvantage-only-reboot-works/6651 "2023-11-30T15:51:42Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [December 5, 2023, 1:39am UTC](https://forum.legato.io/t/loss-of-connection-to-airvantage-only-reboot-works/6651/10 "2023-12-05T01:39:00Z")

</div>

i don’t see problem.  
you can try my script and modify the init script:

```auto

root@fx30:~# cat /home/root/test.sh
sleep 30
echo NO_SLEEP > /sys/power/wake_lock

root@fx30:~# chmod 777 /home/root/test.sh
root@fx30:~#

root@fx30:~# cat /etc/init.d/startlegato.sh
#!/bin/sh
# Copyright (c) Sierra Wireless, Inc.
#
# Provides a hook for legato into the init scripts

if [-e "/etc/run.env"]; then
    source /etc/run.env
fi

FLASH_MOUNTPOINT=${FLASH_MOUNTPOINT:-/mnt/flash}
FLASH_MOUNTPOINT_LEGATO=${FLASH_MOUNTPOINT_LEGATO:-/mnt/legato}

if [-e "${FLASH_MOUNTPOINT_LEGATO}/systems/current/read-only"]
then
    export PATH=/legato/systems/current/bin:$PATH
    LEGATO_START=/legato/systems/current/bin/start
    LEGATO_MNT=${FLASH_MOUNTPOINT_LEGATO}
else
    LEGATO_START=${FLASH_MOUNTPOINT_LEGATO}/start
    LEGATO_MNT=${FLASH_MOUNTPOINT}/legato

    # Create mountpoint in case it doesn't already exists.
    mkdir -p ${LEGATO_MNT}
fi

case "$1" in
    start)
        echo "Legato start sequence"

        umount /legato 2>/dev/null
        mount -o bind $LEGATO_MNT /legato

        test -x $LEGATO_START && $LEGATO_START

#jyi
sh /home/root/test.sh &

        ;;

    stop)
        # Do something to stop Legato
        echo "Legato shutdown sequence"
        test -x $LEGATO_START && $LEGATO_START stop
        umount /legato
        ;;

    *)
        exit 1
        ;;

esac

echo "Finished Legato $1 Sequence"

```

---

_[View the full topic](https://forum.legato.io/t/loss-of-connection-to-airvantage-only-reboot-works/6651)._
