Skip to content

Commit

Permalink
Let path for external media configurable
Browse files Browse the repository at this point in the history
Signed-off-by: Stefano Babic <[email protected]>
  • Loading branch information
sbabic committed Sep 20, 2018
1 parent e7b8797 commit 575b212
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SWUpdateGUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ APP_ID = "SWUpdate-GUI"
VENDOR = "SWUpdate"
LOGO = "images/logo.png"
LANG = "en"
MEDIA = "/media"

-- TODO: is it necessary or better use just config.lua ?
local ARGTEMPLATE = "-r=rotate/N,--help=HELP/S,-l=LOCALE/S"
Expand Down Expand Up @@ -572,7 +573,7 @@ app = ui.Application:new
{
Center = true,
Height = 200,
BasePath = "/media",
BasePath = MEDIA,
Path = "*.swu",
SelectMode = "single",
DisplayMode = "all"
Expand All @@ -581,7 +582,7 @@ app = ui.Application:new
if (status == "selected" and files[1]) then
local swufile = files[1]
if (swufile) then
os.execute("swupdate-client /media" .. path .. "/" .. swufile .. " &")
os.execute("swupdate-client " .. MEDIA .. path .. "/" .. swufile .. " &")
end
end
end)
Expand Down
1 change: 1 addition & 0 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ APP_ID = "SWUpdate Rescue GUI"
LOGO = "logo.png"
NOREBOOT = true
NETWORK_INTERFACES = {"eth0", "eth1"}
MEDIA = "/media"
LANG= "de"
STYLESHEETS = "industrial"
function SAVEIPADDRESS(setup)
Expand Down

0 comments on commit 575b212

Please sign in to comment.