Page 1 of 1
No internet error
Posted:
15.06.2021, 08:30
by negg
Hi, I've noticed a very small issue when running with no internet access to update wsusce. It seems to think there's a new version of the app and well dies as it can't figure out how to download it. A simple ping command to check for internet access and display a message if no access should solve this small issue.
Re: No internet error
Posted:
15.06.2021, 20:32
by aker
So it shows an "update available"-message, when there is no internet connection?
I'll take a look at it.
EDIT: Could you check version "12.6 (b9)" and "12.6 (b9r2)" and report the result with both versions?
Re: No internet error
Posted:
15.06.2021, 22:38
by negg
Checking now......
Re: No internet error
Posted:
15.06.2021, 22:45
by negg
b9 seems to run without saying there is a new version. Obviously, it does not download anything as the internet was turned off.
checking b9r2 now......
b9r2 does the same as b9 no message about a new version.
However wouldn't it be easier to do a check for an active internet connection and halting the script beforehand?
Re: No internet error
Posted:
15.06.2021, 23:49
by aker
Failed PING != no internet connection as a firewall or something similar may block IMCP messages while allowing TCP/UDP traffic.
Maybe I'll implement a test download of "branchtest.txt" from the "wsusoffline-sdd"-Repo, which was intended for something copletely different, but would fit that purpose. But then I might run into issues, where the script is not able to connect to GitLab, while MS' servers are available.
There is no real gold solution...
Re: No internet error
Posted:
16.06.2021, 00:10
by Dalai
@aker:
It should be enough to run something like
- Code: Select all
wget --spider --server-response http://www.some.url
and check the exit code of that command. In other words: No need to download anything specific (which would have to be deleted afterwards). [The parameter/switch --server-response is optional and just for visual/testing purposes.]
Regards
Dalai
Re: No internet error
Posted:
16.06.2021, 00:52
by aker
Downloading a file with known content isn't really needed, but it should catch possible portal sites e.g. public hotspots use.
That's why I thought about that.
"wget --spider" would tell me, if an answer was received, but (without parsing the result) not, if it gets the file I expect it to get.
Re: No internet error
Posted:
16.06.2021, 07:47
by negg
Sounds like I've caused a bit of an issue when I thought it would be something simple to sort. I blame EE for my rubbish connection Sorry
Re: No internet error
Posted:
16.06.2021, 14:28
by boco
Nothing new, Firefox uses (used?) the following URL.
http://detectportal.firefox.com/success.txt