No internet error

No internet error

Postby negg » 15.06.2021, 08:30

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.
negg
 
Posts: 200
Joined: 26.03.2014, 11:46

Re: No internet error

Postby aker » 15.06.2021, 20:32

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?
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to keep or sell it.
aker


WSUS Offline Update „Community Edition“ 12.5.1 / 11.9.9esr
https://gitlab.com/wsusoffline
aker
 
Posts: 3901
Joined: 02.03.2011, 15:32

Re: No internet error

Postby negg » 15.06.2021, 22:38

Checking now......
negg
 
Posts: 200
Joined: 26.03.2014, 11:46

Re: No internet error

Postby negg » 15.06.2021, 22:45

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?
negg
 
Posts: 200
Joined: 26.03.2014, 11:46

Re: No internet error

Postby aker » 15.06.2021, 23:49

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...
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to keep or sell it.
aker


WSUS Offline Update „Community Edition“ 12.5.1 / 11.9.9esr
https://gitlab.com/wsusoffline
aker
 
Posts: 3901
Joined: 02.03.2011, 15:32

Re: No internet error

Postby Dalai » 16.06.2021, 00:10

@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
Dalai
 
Posts: 1036
Joined: 12.07.2016, 21:00

Re: No internet error

Postby aker » 16.06.2021, 00:52

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.
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to keep or sell it.
aker


WSUS Offline Update „Community Edition“ 12.5.1 / 11.9.9esr
https://gitlab.com/wsusoffline
aker
 
Posts: 3901
Joined: 02.03.2011, 15:32

Re: No internet error

Postby negg » 16.06.2021, 07:47

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 :(
negg
 
Posts: 200
Joined: 26.03.2014, 11:46

Re: No internet error

Postby boco » 16.06.2021, 14:28

Nothing new, Firefox uses (used?) the following URL.

http://detectportal.firefox.com/success.txt
Microsoft update catalog: http://catalog.update.microsoft.com/v7/site/
Windows Install media download: https://support.microsoft.com/en-us/help/15088/windows-create-installation-media
boco
 
Posts: 2359
Joined: 24.11.2009, 17:00
Location: Germany


Return to Download

Who is online

Users browsing this forum: No registered users and 4 guests