Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
ffbs-gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
darkbit
ffbs-gluon
Commits
9c2ba883
Commit
9c2ba883
authored
11 years ago
by
Nils Schneider
Browse files
Options
Downloads
Patches
Plain Diff
gluon-luci-admin: system.lua -> upgrade.lua
parent
6a2e7d45
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
package/gluon-luci-admin/files/usr/lib/lua/luci/controller/admin/upgrade.lua
+7
-7
7 additions, 7 deletions
...admin/files/usr/lib/lua/luci/controller/admin/upgrade.lua
with
7 additions
and
7 deletions
package/gluon-luci-admin/files/usr/lib/lua/luci/controller/admin/
system
.lua
→
package/gluon-luci-admin/files/usr/lib/lua/luci/controller/admin/
upgrade
.lua
+
7
−
7
View file @
9c2ba883
...
...
@@ -13,7 +13,7 @@ You may obtain a copy of the License at
$Id$
]]
--
module
(
"luci.controller.admin.
system
"
,
package
.
seeall
)
module
(
"luci.controller.admin.
upgrade
"
,
package
.
seeall
)
function
index
()
entry
({
"admin"
,
"passwd"
},
cbi
(
"admin/passwd"
),
"Admin Password"
,
10
)
...
...
@@ -24,7 +24,7 @@ function action_upgrade()
require
(
"luci.model.uci"
)
local
tmpfile
=
"/tmp/firmware.img"
local
function
image_supported
()
-- XXX: yay...
return
(
0
==
os.execute
(
...
...
@@ -34,11 +34,11 @@ function action_upgrade()
%
tmpfile
)
)
end
local
function
image_checksum
()
return
(
luci
.
sys
.
exec
(
"md5sum %q"
%
tmpfile
):
match
(
"^([^%s]+)"
))
end
local
function
storage_size
()
local
size
=
0
if
nixio
.
fs
.
access
(
"/proc/mtd"
)
then
...
...
@@ -86,7 +86,7 @@ function action_upgrade()
local
has_support
=
image_supported
()
local
has_platform
=
nixio
.
fs
.
access
(
"/lib/upgrade/platform.sh"
)
local
has_upload
=
luci
.
http
.
formvalue
(
"image"
)
--
-- This is step 1-3, which does the user interaction and
-- image upload.
...
...
@@ -99,7 +99,7 @@ function action_upgrade()
if
has_image
then
nixio
.
fs
.
unlink
(
tmpfile
)
end
luci
.
template
.
render
(
"admin/upgrade"
,
{
step
=
1
,
bad_image
=
(
has_image
and
not
has_support
or
false
),
...
...
@@ -116,7 +116,7 @@ function action_upgrade()
flashsize
=
storage_size
(),
keepconfig
=
(
keep_avail
and
luci
.
http
.
formvalue
(
"keepcfg"
)
==
"1"
)
}
)
-- Step 3: load iframe which calls the actual flash procedure
elseif
step
==
3
then
-- invoke sysupgrade
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment