Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stuck on "Waiting for route change to take effect" #14

Open
geransmith opened this issue Mar 24, 2016 · 2 comments
Open

stuck on "Waiting for route change to take effect" #14

geransmith opened this issue Mar 24, 2016 · 2 comments

Comments

@geransmith
Copy link

I am running hits on my router using entware. It looks like the script is getting stuck on line 115.

    while [ $route_set = 1 ]; do
    route_set=$(curl -4 -s "https://network.feral.io/looking-glass?action=traceroute&host=$ext_IP" | grep -c "$old_route")
    done

I manually added some echos for those variables, and it looks like route_set is not getting set properly. I then ran the curl and grep commands manually with the variables filled in properly. It looks like grep returns the expected 0 value (so the script can move on), BUT, curl then outputs additional text, clobbering the results. Essentially it looks like this:

admin@router:/tmp/home/root# curl -4 -s https://network.feral.io/looking-glass?action=traceroute&host=99.99.99.99 | grep -c "77.67.64.81"
0
admin@router:/tmp/home/root# <!DOCTYPE html>
<html lang="en-GB">
    <head>
        <title>Looking Glass - network.feral.io</title>
        <link rel="stylesheet" type="text/css" media="all" href="/css/reset.css">
        <link rel="stylesheet" type="text/css" media="all" href="/css/network.feral.io.css">

    </head>

I did some Googling and was trying to see if someone else had run into curl being strange. In some futile attempts to fix this, I was able to workaround it by adding a syntax error to curl. Curl continued to run as expected, but reported a warning message.. That was apparently enough for it to continue on in the rest of the script though.

@frankthetank7254
Copy link
Owner

i could probably put in another check in there to ensure that the step actually does what it is supposed to do... It is a bit of a weird check to begin with... I will try to come up with a better method. I have been busy lately, but I will let you know if i come up with something...

@geransmith
Copy link
Author

It seems like it is more with how curl is returning information. It is clobbering the rest of the output. I will try and tinker with it a bit to see if I can find a way to code around it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants