diff options
author | Karel Kočí <cynerd@email.cz> | 2020-07-06 14:11:53 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2020-07-06 14:11:53 +0200 |
commit | 595475d8f5bd6b6bc926a57e7b1c183bbb26ea0e (patch) | |
tree | 9cd82eb0522e57ef4790d8972b371b906003a238 /updater-ng/files | |
parent | f199cf1563648ed0f750677b854c5388625aa719 (diff) | |
download | openwrt-personal-pkgs-595475d8f5bd6b6bc926a57e7b1c183bbb26ea0e.tar.gz openwrt-personal-pkgs-595475d8f5bd6b6bc926a57e7b1c183bbb26ea0e.tar.bz2 openwrt-personal-pkgs-595475d8f5bd6b6bc926a57e7b1c183bbb26ea0e.zip |
updater-ng: remove as latest version is now in HBK
Diffstat (limited to 'updater-ng/files')
-rw-r--r-- | updater-ng/files/turris.lua | 95 | ||||
-rwxr-xr-x | updater-ng/files/update_alternatives.sh | 23 | ||||
-rw-r--r-- | updater-ng/files/updater.config | 4 |
3 files changed, 0 insertions, 122 deletions
diff --git a/updater-ng/files/turris.lua b/updater-ng/files/turris.lua deleted file mode 100644 index 97a7faf..0000000 --- a/updater-ng/files/turris.lua +++ /dev/null @@ -1,95 +0,0 @@ ---[[ -This file is part of updater-ng. Don't edit it. -]] - -local uci_cursor = nil -if uci then - uci_cursor = uci.cursor(root_dir .. "/etc/config") -else - ERROR("UCI library is not available. Configuration not used.") -end -local function uci_cnf(name, default) - if uci_cursor then - return uci_cursor:get("updater", "turris", name) or default - else - return default - end -end - --- Configuration variables -local mode = uci_cnf("mode", "branch") -- should we follow branch or version? -local branch = uci_cnf("branch", "hbs") -- which branch to follow -local version = uci_cnf("version", nil) -- which version to follow -local pkglists = uci_cnf("pkglists", {}) -- what additional lists should we use - --- Verify that we have sensible configuration -if mode == "version" and not version then - WARN("Mode configured to be 'version' but no version provided. Changing mode to 'branch' instead.") - mode = "branch" -end - --- Convert pkglists to set set of lists (ensures uniqueness) -if type(pkglists) == "string" then -- if there is single list then uci returns just a string - pkglists = {pkglists} -end -local lists = {} -for _, list in pairs(pkglists) do - lists["pkglists/" .. list] = true -end - --- Load lists forced by boot arguments -if root_dir == "/" then - local cmdf = io.open("/proc/cmdline") - if cmdf then - for cmdarg in cmdf:read():gmatch('[^ ]+') do - local key, value = cmdarg:match('([^=]+)=(.*)') - if key == "turris_lists" then - for list in value:gmatch('[^,]+') do - lists[list] = true - end - end - end - cmdf:close() - end -end - --- Detect host board -local product = os_release["OPENWRT_DEVICE_PRODUCT"] or os_release["LEDE_DEVICE_PRODUCT"] -if product:match("[Mm]ox") then - board = "mox" -elseif product:match("[Oo]mnia") then - board = "omnia" -elseif product:match("[Tt]urris 1.x") then - board = "turris1x" -else - DIE("Unsupported Turris board: " .. tostring(product)) -end -Export('board') - --- Common URI to Turris OS lists -local base_url -if mode == "branch" then - base_url = "https://repo.turris.cz/" .. branch .. "/" .. board .. "/lists/" -elseif mode == "version" then - base_url = "https://repo.turris.cz/archive/" .. version .. "/" .. board .. "/lists/" -else - DIE("Invalid updater.turris.mode specified: " .. mode) -end - --- Common connection settings for Turris OS scripts -local script_options = { - security = "Remote", - pubkey = { - "file:///etc/updater/keys/release.pub", - "file:///etc/updater/keys/standby.pub", - "file:///etc/updater/keys/test.pub" -- It is normal for this one to not be present in production systems - } -} - --- The distribution base script. It contains the repository and bunch of basic packages -Script(base_url .. "base.lua", script_options) - --- Additional enabled distribution lists -for l in pairs(lists) do - Script(base_url .. l .. ".lua", script_options) -end diff --git a/updater-ng/files/update_alternatives.sh b/updater-ng/files/update_alternatives.sh deleted file mode 100755 index c93ae45..0000000 --- a/updater-ng/files/update_alternatives.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -set -e - -if [ $# -gt 0 ]; then - echo "This script is part of updater and allows user to manually fix alternative links in system." >&2 - exit 0 -fi - -if [ ! -d /usr/lib/opkg/info ]; then - echo "OPKG info directory not located. This is OpenWrt system, isn't it?" >&2 - exit 1 -fi - -# Fist install all busybox applets and then overwite them with alternatives - -busybox --install /bin - -sed -n 's/^Alternatives://p' /usr/lib/opkg/info/*.control | \ - tr , '\n' | \ - sort -n | \ - while IFS=: read PRIO TRG SRC; do - ln -sf "$SRC" "$TRG" - done diff --git a/updater-ng/files/updater.config b/updater-ng/files/updater.config deleted file mode 100644 index 82e220e..0000000 --- a/updater-ng/files/updater.config +++ /dev/null @@ -1,4 +0,0 @@ - -config turris 'turris' - option mode 'branch' - |