Login  Register

Re: Use system restore to install hotfixes

Posted by Gnomad on Mar 13, 2016; 4:12am
URL: https://itus.accessinnov.com/Use-system-restore-to-install-hotfixes-tp380p418.html

There's a action_flashops() function within /usr/lib/lua/luci/controller/admin/system.lua that looks to do the work from the htm file.  Within that it sets a command
local restore_cmd = "tar -xzC/ >/dev/null 2>&1"
but I can't see that this is executed at all.  The handler further down in the file looks like it just reboots only:
elseif luci.http.formvalue("restore") then
    -- Unpack received .tar.gz
    local upload = luci.http.formvalue("archive")
    if upload and #upload > 0 then
        luci.template.render("admin_system/applyreboot")
    --   luci.sys.reboot()
        luci.sys.call("reboot -f")
    end
elseif ...

No calls to /sbin/sysupgrade that I can see.  Any tips on syntax for a command to insert before the reboot, to try calling "restore_cmd" against "upload"?  
(been 15 years since I've done much unix flavoured scripting!)
OpenWrt SNAPSHOT, r10391-3d8d528939