Fun checking the openwrt download repository

  • Hi,

    The repository seems to be down at the moment and if you do an update, it can wait forever to come back on its own.... So, I wrote a fun script to check first:

    root@Omega-1F15:/usr/brian# cat ping_opkg

    ping -c 1 -W 1 > /dev/null
    opkg update
    echo "Noooooo..!"

    Save the file as ping_opkg, and make it executable with:
    chmod 777 ping_opkg

    run like this:

    It will either do the update or say, "Noooo!" if it can't and doesn't gang the system :-)

  • @TheLion How would you have it test via time limit? Thanks for the code.

  • @Guest In the ping command, "ping -c 1 -W 1" there are the two parameters - c1 and W1. The number after the "c" is the amount of pings sent and the number after the "W" is the timeout in seconds.

    In this case, I have asked for one ping and to wait 1 second for the reply.

Log in to reply

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.