![]() |
|
kamailio-imx6 install.lua: a failed download leaves an unrepairable partial install - Printable Version +- LogicMachine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: General (https://forum.logicmachine.net/forumdisplay.php?fid=2) +--- Thread: kamailio-imx6 install.lua: a failed download leaves an unrepairable partial install (/showthread.php?tid=6546) |
kamailio-imx6 install.lua: a failed download leaves an unrepairable partial install - krymsan - 09.09.2026 Hello, Three observations about the installation method in kb.logicmachine.net/integration/sip-server/, in case they are useful. 1. A FAILED DOWNLOAD LEAVES A PARTIAL INSTALL, SILENTLY The script runs ten os.execute('opkg --force-depends install http://...') calls and checks none of their return values. The guard at the top is if not io.exists('/etc/init.d/kamailio') and /etc/init.d/kamailio is created by the fourth package (kamailio3) - before the six module packages are installed. So if a download fails after kamailio3 succeeds, the result is a running Kamailio with some modules missing, and re-running the script does nothing, because the guard is now satisfied. Nothing reports an error. During my own installation one of the downloads did not complete (dl.openrb.com was not responding at that moment - it is reachable again now), which is how I noticed this. This does not seem to be a one-off. While checking which module packages exist, I made twelve sequential requests to the same host: eleven returned a status (200 or 404) and one returned no response at all. That one was kamailio3-mod-maxfwd, which does exist - it returned 200 when I retried the identical request a minute later. I cannot rule out something on my own network, but a single dropped request in a run of twelve is enough to break an unchecked ten-step install. Checking the exit status of each opkg call, or testing for one of the module files instead of the init script, would make a retry actually repair the install. 2. PLAIN HTTP, AND HTTPS CANNOT SIMPLY BE SUBSTITUTED The packages are fetched over plain HTTP with no signature verification and installed as root with --force-depends. Worth noting for anyone thinking of just changing the URLs: the wget on the device is the BusyBox build with no TLS support - it returns "not an http or ftp url" for an https URL. So the client side would need attention too if TLS or signed distribution were ever considered. 3. FIRMWARE UPGRADES The article says the script must be executed again after each firmware upgrade, which matches what I found - the device has no overlay filesystem (/dev/root is mounted directly on /), so everything under / is replaced. Is including Kamailio in the firmware image an option? Re-running a script after every upgrade is workable for one device, but combined with point 1 a partially repaired install would be easy to miss. Thanks.
|