We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

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

    if
    ping -c 1 -W 1 downloads.openwrt.org > /dev/null
    then
    opkg update
    else
    echo "Noooooo..!"
    fi

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

    run like this:
    ./ping_opkg

    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 downloads.openwrt.org" 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 Community was lost, please wait while we try to reconnect.