modules/*: Reintroduced the broadcom sanity check
authorSteven Barth <steven@midlink.org>
Fri, 15 Aug 2008 00:44:13 +0000 (00:44 +0000)
committerSteven Barth <steven@midlink.org>
Fri, 15 Aug 2008 00:44:13 +0000 (00:44 +0000)
modules/admin-full/luasrc/controller/admin/system.lua
modules/admin-mini/luasrc/controller/mini/system.lua

index cdf7ee2c649c10f54fbc04cd741a0fc8f8d92cd0..4303d86ebff91b6e40978f4da0b7b79ca3981b3e 100644 (file)
@@ -184,8 +184,9 @@ function action_upgrade()
        local ret  = nil
        local plat = luci.fs.mtime("/lib/upgrade/platform.sh")
        local tmpfile = "/tmp/firmware.img"
-       
-       local keep_avail = true
+       local broadcom = os.execute('grep brcm_ /lib/upgrade/platform.sh >/dev/null 2>&1') == 0
+        
+       local keep_avail = not broadcom
 
        local file
        luci.http.setfilehandler(
index 60f29323d891e8ed541fa6c427acf5ad8ae744b7..255e26f655bdd5f261704e90879bc90cb3a7a8ad 100644 (file)
@@ -82,8 +82,9 @@ function action_upgrade()
        local ret  = nil
        local plat = luci.fs.mtime("/lib/upgrade/platform.sh")
        local tmpfile = "/tmp/firmware.img"
-       
-       local keep_avail = true
+       local broadcom = os.execute('grep brcm_ /lib/upgrade/platform.sh >/dev/null 2>&1') == 0
+        
+       local keep_avail = not broadcom
 
        local file
        luci.http.setfilehandler(