1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
local uci_cursor = uci.cursor(root_dir .. "/etc/config")
local board
if model:match('Mox') then
board = "mox"
elseif model:match('Omnia') then
board = "omnia"
elseif model:match('^Turris$') then
board = "turris"
else
DIE("Unsupported board!")
end
local mode = uci_cursor:get("updater", "turris", "mode")
local animal = uci_cursor:get("updater", "turris", "branch")
if mode and mode ~= "branch" then
DIE("Only branch mode allowed for personal-pkgs, used: " .. tostring(mode))
end
if animal ~= "hbd" and animal ~= "hbk" then
DIE("Unsupported branch for pernal-pkgs: " .. tostring(animal))
end
Repository("personal-pkgs", "https://cynerd.cz/repo/turris/" .. animal .. "/" .. animal .. "/" .. board, {
pubkey = "file:///etc/updater/keys/personal-pkgs.pub",
ocsp = false
})
----------------------------------------------------------------------------------
Install("personal-pkgs-repo")
Package("personal-pkgs-repo", { replan = "finished" })
local tools = false
local vpn = false
uci_cursor:foreach("system", "system", function(s) hostname = s['hostname'] end)
if hostname == "turris-prague" then
tools = true
vpn = true
Install("6to4")
elseif hostname == "turris-home" then
tools = true
vpn = true
Install("transmission-daemon-openssl")
end
if tools then
Install("grep", "coreutils-sha256sum")
Install("iperf", "iperf3")
Install("sysstat", "strace", "gdbserver")
Install("shellrc-zsh", "shellrc-ash")
end
if vpn then
Install("luci-app-openvpn", "openvpn-openssl")
Install("luci-app-wireguard", "wireguard")
end
|