summaryrefslogtreecommitdiff
path: root/updater-ng/files/uci-defaults
diff options
context:
space:
mode:
Diffstat (limited to 'updater-ng/files/uci-defaults')
-rw-r--r--updater-ng/files/uci-defaults16
1 files changed, 16 insertions, 0 deletions
diff --git a/updater-ng/files/uci-defaults b/updater-ng/files/uci-defaults
new file mode 100644
index 0000000..63fe73b
--- /dev/null
+++ b/updater-ng/files/uci-defaults
@@ -0,0 +1,16 @@
+#!/bin/sh
+set -eu
+
+# bootstrap file is created to store content of BOOTSTRAP_UPDATER_BRANCH
+# environment variable, if defined, when updater is run in out root mode (the way
+# bootstrap is performed).
+# BOOTSTRAP_UPDATER_BRANCH contains simply target branch for updater (eg. HBL or HBD).
+bootstrap="/usr/share/updater/bootstrap-updater-branch"
+
+if [ -f "$bootstrap" ]; then
+ uci -q batch <<-EOF
+ set updater.turris.branch='$(cat "$bootstrap")'
+ commit updater.turris.branch
+ EOF
+ rm -f "$bootstrap"
+fi