Ed_P wrote: ↑15 Dec 2022, 20:50
donald wrote: ↑15 Dec 2022, 20:33
IMO the md5sum should be better checked against the file
from the porteus server.
An interesting point
donald.
Not just interesting, but essential.
when a rogue player wants to give Port users malign code inserts, then tweaking e.g. 001-core.xzm on a less that secure mirror server and also tweak the md5sum on the same mirror server - our update script would not realize it incorporated malign code.
Added in 5 minutes 10 seconds:
Code: Select all
Starting checks ...
[OK] Server: http://dl.porteus.org
[OK] Architecture: x86_64
[OK] User is root
[OK] Distro is Porteus
[OK] Base folder is writable
[ERROR] An internet connection is required.
It is obvious that I have internet:
Code: Select all
Checking fastest mirror ...
Testing http://ftp.vim.org/ftp/os/Linux/distr/porteus/ 0.260650
Testing http://ftp.nluug.nl/os/Linux/distr/porteus/ 0.063415
Testing http://mirrors.dotsrc.org/porteus/ 0.287085
Testing https://mirrors.dotsrc.org/porteus/ 0.161571
Testing http://ftp.cc.uoc.gr/pub/linux/porteus/ 2.034334
Testing http://www6.frugalware.org/mirrors/linux/porteus/ 0.365479
Testing http://ftp.riken.jp/Linux/porteus/ 1.611825
Testing http://www.mirrorservice.org/sites/dl.porteus.org/ 0.166505
Testing http://linux.rz.rub.de/porteus/ 1.106170
Testing http://ftpmirror1.infania.net/mirror/porteus/ 0.191484
Testing https://mirror.yandex.ru/mirrors/porteus/ 0.308317
Results:
0.063415 http://ftp.nluug.nl/os/Linux/distr/porteus/
0.161571 https://mirrors.dotsrc.org/porteus/
0.166505 http://www.mirrorservice.org/sites/dl.porteus.org/
0.191484 http://ftpmirror1.infania.net/mirror/porteus/
0.260650 http://ftp.vim.org/ftp/os/Linux/distr/porteus/
0.287085 http://mirrors.dotsrc.org/porteus/
0.308317 https://mirror.yandex.ru/mirrors/porteus/
0.365479 http://www6.frugalware.org/mirrors/linux/porteus/
1.106170 http://linux.rz.rub.de/porteus/
1.611825 http://ftp.riken.jp/Linux/porteus/
2.034334 http://ftp.cc.uoc.gr/pub/linux/porteus/
Would you like to add http://ftp.nluug.nl/os/Linux/distr/porteus/ as your main Porteus server? [y/n]
root@porteus:~#
and I not use my usual wonky network, now it's a different WLAN one.
I know there is a different thread that solved the issue (it was about how porteus determines if it is online) but I do not recall where that was.
And tips to that solution appreciated.
(One would think when I already upgraded some base modules then the fix would be incorporated, but seemingly no. Or maybe my system has the old fix but my current internet demand even more of fix)
Added in 2 minutes 31 seconds:
The above was via Port Settings Manager. When I run the script directly I get the same result:
Code: Select all
root@porteus:~# /opt/porteus-scripts/update-porteus
Starting checks ...
[OK] Server: http://dl.porteus.org
[OK] Architecture: x86_64
[OK] User is root
[OK] Distro is Porteus
[OK] Base folder is writable
[ERROR] An internet connection is required.
root@porteus:~# echo $?
0
Added in 10 minutes 15 seconds:
I searched the forum via
https://duckduckgo.com/?t=palemoon&q=is ... orteus.org and found this thread
Porteus Updater - ERROR An internet connection is required
For me
Blaze wrote: ↑03 May 2019, 10:25
Code: Select all
wget -q --spider --force-html --inet4-only http://dl.porteus.org || { echo "Fatal error. Could not contact server."; exit 1; }
Blaze's trick seems to work:
Code: Select all
root@porteus:~# wget -q --spider --force-html --inet4-only http://dl.porteus.org || { echo "Fatal error. Could not contact server."; exit 1; }
root@porteus:~# echo $?
0
root@porteus:~#
(Though as test I suggest it being more verbose like so:)
wget -q --spider --force-html --inet4-only
http://dl.porteus.org || { echo "Fatal error. Could not contact server."; exit 1; } && echo "All went well, server available."
Code: Select all
root@porteus:~# wget -q --spider --force-html --inet4-only http://dl.porteus.org || { echo "Fatal error. Could not contact server."; exit 1; } && echo "All went well, server available."
All went well, server available.
root@porteus:~# echo $?
0
root@porteus:~#
The original code is_online_url works for me:
(So that I can exit the extra layer of bash that will have /usr/share/porteus/porteus-functions permanently loaded.)
Code: Select all
root@porteus:~# . /usr/share/porteus/porteus-functions
root@porteus:~# is_online_url http://porteus.org/porteus-mirrors.txt
root@porteus:~# echo $?
0
root@porteus:~#