diff options
-rw-r--r-- | conf/local.conf.base.append (renamed from conf/local.nonsystemd.conf.sample.append) | 3 | ||||
-rw-r--r-- | conf/local.conf.systemd.append (renamed from conf/local.conf.sample.append) | 20 | ||||
-rwxr-xr-x | scripts/envsetup.sh | 13 |
3 files changed, 11 insertions, 25 deletions
diff --git a/conf/local.nonsystemd.conf.sample.append b/conf/local.conf.base.append index 6aeb61c..36b2f59 100644 --- a/conf/local.nonsystemd.conf.sample.append +++ b/conf/local.conf.base.append | |||
@@ -1,11 +1,10 @@ | |||
1 | |||
2 | # | 1 | # |
3 | # meta-updater configuration, see README.adoc and aktualizr's | 2 | # meta-updater configuration, see README.adoc and aktualizr's |
4 | # documentation for more options and detailed documentation | 3 | # documentation for more options and detailed documentation |
5 | # | 4 | # |
6 | 5 | ||
7 | MACHINE = "##MACHINE##" | 6 | MACHINE = "##MACHINE##" |
8 | DISTRO = "poky-sota" | 7 | DISTRO = "##DISTRO##" |
9 | 8 | ||
10 | # General SOTA setup | 9 | # General SOTA setup |
11 | #SOTA_CLIENT_PROV = "aktualizr-shared-prov" | 10 | #SOTA_CLIENT_PROV = "aktualizr-shared-prov" |
diff --git a/conf/local.conf.sample.append b/conf/local.conf.systemd.append index fc565f8..12e0182 100644 --- a/conf/local.conf.sample.append +++ b/conf/local.conf.systemd.append | |||
@@ -1,23 +1,3 @@ | |||
1 | |||
2 | # | ||
3 | # meta-updater configuration, see README.adoc and aktualizr's | ||
4 | # documentation for more options and detailed documentation | ||
5 | # | ||
6 | |||
7 | MACHINE = "##MACHINE##" | ||
8 | DISTRO = "poky-sota-systemd" | ||
9 | |||
10 | # General SOTA setup | ||
11 | #SOTA_CLIENT_PROV = "aktualizr-shared-prov" | ||
12 | #SOTA_PACKED_CREDENTIALS = "/path/to/credentials.zip" | ||
13 | |||
14 | # Uncomment this line to start an ssh server at boot automatically | ||
15 | #IMAGE_FEATURES += "ssh-server-dropbear" | ||
16 | |||
17 | # Uncomment this line to set the log level of aktualizr to 'debug' (from 'info' | ||
18 | # by default) | ||
19 | #IMAGE_INSTALL_append += " aktualizr-log-debug" | ||
20 | |||
21 | # Store systemd logs in persistent storage | 1 | # Store systemd logs in persistent storage |
22 | # | 2 | # |
23 | # It greatly helps diagnosing issues on testing devices but should be | 3 | # It greatly helps diagnosing issues on testing devices but should be |
diff --git a/scripts/envsetup.sh b/scripts/envsetup.sh index 4754e1d..19a5c94 100755 --- a/scripts/envsetup.sh +++ b/scripts/envsetup.sh | |||
@@ -4,10 +4,11 @@ SCRIPT="envsetup.sh" | |||
4 | MACHINE="$1" | 4 | MACHINE="$1" |
5 | BUILDDIR="build" | 5 | BUILDDIR="build" |
6 | DISTRO="poky-sota-systemd" | 6 | DISTRO="poky-sota-systemd" |
7 | declare -A supported_distros=( ["poky-sota-systemd"]="local.conf.sample.append" ["poky-sota"]="local.nonsystemd.conf.sample.append" ) | 7 | BASE_CONF="local.conf.base.append" |
8 | declare -A supported_distros=( ["poky-sota-systemd"]="local.conf.systemd.append" ["poky-sota"]="local.conf.base.append" ) | ||
8 | 9 | ||
9 | [[ "$#" -lt 1 ]] && { echo "Usage: ${SCRIPT} <machine> [builddir] [distro=< poky-sota-systemd | poky-sota >]"; return 1; } | 10 | [[ "$#" -lt 1 ]] && { echo "Usage: ${SCRIPT} <machine> [builddir] [distro=< poky-sota-systemd | poky-sota >]"; return 1; } |
10 | [[ "$#" -eq 2 ]] && { BUILDDIR="$2"; } | 11 | [[ "$#" -ge 2 ]] && { BUILDDIR="$2"; } |
11 | [[ "$#" -eq 3 ]] && { DISTRO="$3"; } | 12 | [[ "$#" -eq 3 ]] && { DISTRO="$3"; } |
12 | 13 | ||
13 | # detect if this script is sourced: see http://stackoverflow.com/a/38128348/6255594 | 14 | # detect if this script is sourced: see http://stackoverflow.com/a/38128348/6255594 |
@@ -35,7 +36,13 @@ if [[ ! -f "${BUILDDIR}/conf/local.conf" ]]; then | |||
35 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota.inc" >> conf/bblayers.conf | 36 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota.inc" >> conf/bblayers.conf |
36 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc" >> conf/bblayers.conf | 37 | cat "${METADIR}/meta-updater/conf/include/bblayers/sota_${MACHINE}.inc" >> conf/bblayers.conf |
37 | 38 | ||
38 | sed "s/##MACHINE##/$MACHINE/g" "${METADIR}/meta-updater/conf/$DISTRO_CONF" >> conf/local.conf | 39 | sed -e "s/##MACHINE##/$MACHINE/g" \ |
40 | -e "s/##DISTRO##/$DISTRO/g" \ | ||
41 | "${METADIR}/meta-updater/conf/$BASE_CONF" >> conf/local.conf | ||
42 | |||
43 | if [ "$BASE_CONF" != "$DISTRO_CONF" ]; then | ||
44 | cat "${METADIR}/meta-updater/conf/$DISTRO_CONF" >> conf/local.conf | ||
45 | fi | ||
39 | else | 46 | else |
40 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" | 47 | source "$METADIR/poky/oe-init-build-env" "$BUILDDIR" |
41 | fi | 48 | fi |