A Quickie

ukayjohn

Member
Maybe...anyone point me in the direction of info relating to the disablement/removal of installed packages via webif when offline. Sure I was able to do this before, attempted removal now only returns the message that this cannot be done as I don't have a valid internet connection.
 
Sounds like a bug to me. New checks were introduced recently by af123 which confirms availability of the repository using ping, before issuing any opkg command. However, this check should only apply to installs, not removals which do not require the repository.
 
It's a bit of over-zealous checking. Easily fixed:
Code:
--- /mod/webif/cgi-bin/opkg.jim~
+++ /mod/webif/cgi-bin/opkg.jim
@@ -22,12 +22,14 @@
 httpheader "text/plain"
+if {$cmd eq "install" || $cmd eq "update" || $cmd eq "upgrade"} {
 if {![system connectivity]} {
  puts ""
  puts "!!  ERROR - No network connectivity to package repository  !!"
  puts ""
  puts "Check your Internet connection and DNS service and then try again."
  exit
+  }
 }
 if {$cmd eq "upgrade"} { opkg update }
 
Thanks - I'll fix it. The code will look more like:

Code:
set netcmds {install update upgrade}
if {$cmd in $netcmds && ![system connectivity]} {
...
}
 
Last edited:
I knew there'd be an easier/better way - was just too lazy to look it up.
 
Back
Top