File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
meta-lxatac-software/recipes-core/bundles/files Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,18 @@ bundle on your TAC:
27
27
28
28
If that does not work you may want to [ re-install via USB] ( #installing-images-via-usb ) .
29
29
30
+ If you've made changes to your TACs configuration that you want to preserve,
31
+ which are not covered by the default update migration logic,
32
+ you can add a list of additional files to migrate to the
33
+ ` /etc/rauc/migrate.d ` :
34
+
35
+ root@lxatac-00010:~ cat /etc/rauc/migrate.d/git_config.conf
36
+ /etc/gitconfig
37
+ /home/root/.gitconfig
38
+
39
+ If that is not enough customization for you then read on to learn
40
+ how to build fully-custom images for your LXA TAC.
41
+
30
42
Building the image as-is
31
43
------------------------
32
44
Original file line number Diff line number Diff line change 2
2
3
3
set -exu -o pipefail
4
4
5
+ EXTRA_MIGRATE_LISTS_DIR=" /etc/rauc/migrate.d"
5
6
CERT_AVAILABLE_DIR=" ${RAUC_SLOT_MOUNT_POINT} /etc/rauc/certificates-available"
6
7
CERT_ENABLED_DIR=" ${RAUC_SLOT_MOUNT_POINT} /etc/rauc/certificates-enabled"
7
8
@@ -44,6 +45,22 @@ function migrate () {
44
45
cp -a " $1 " " ${RAUC_SLOT_MOUNT_POINT} /$1 "
45
46
}
46
47
48
+ function process_migrate_lists () {
49
+ if [ ! -d " ${EXTRA_MIGRATE_LISTS_DIR} " ]; then
50
+ return
51
+ fi
52
+
53
+ for migrate_list in " ${EXTRA_MIGRATE_LISTS_DIR} " /* .conf; do
54
+ # Migrate files in the list line by line
55
+ while read -r line; do
56
+ migrate " ${line} "
57
+ done < " ${migrate_list} "
58
+
59
+ # Also migrate the list itself
60
+ migrate " ${migrate_list} "
61
+ done
62
+ }
63
+
47
64
case " $1 " in
48
65
slot-post-install)
49
66
enable_certificates
@@ -63,6 +80,12 @@ case "$1" in
63
80
migrate /home/root/.bash_history
64
81
migrate /home/root/.ssh/authorized_keys
65
82
migrate /var/cache/lxa-iobus/lss-cache
83
+
84
+ # Also allow the running system to specify additional files to
85
+ # migrate to the new slot via files in /etc/rauc/migrate.d.
86
+ # The files should contain one file per line that should be
87
+ # migrated to the new slot.
88
+ process_migrate_lists
66
89
;;
67
90
* )
68
91
exit 1
You can’t perform that action at this time.
0 commit comments