File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
pkg/cidata/cidata.TEMPLATE.d Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -12,18 +12,17 @@ WARNING() {
12
12
# shellcheck disable=SC2163
13
13
while read -r line; do export " $line " ; done < " ${LIMA_CIDATA_MNT} " /lima.env
14
14
15
- if [ -e /etc/environment ]; then
16
- sed -i ' /#LIMA-START/,/#LIMA-END/d' /etc/environment
17
- fi
18
- cat " ${LIMA_CIDATA_MNT} /etc_environment" >> /etc/environment
19
-
20
15
# shellcheck disable=SC2163
21
16
while read -r line; do
22
17
[ " $( expr " $line " : ' #' ) " -eq 0 ] && export " $line "
23
18
done < " ${LIMA_CIDATA_MNT} " /etc_environment
24
19
25
20
CODE=0
26
21
22
+ # Don't make any changes to /etc or /var/lib until the boot/* scripts have run
23
+ # because they might move the directories to /mnt/data on first boot, so changes
24
+ # made on restart would be lost.
25
+
27
26
for f in " ${LIMA_CIDATA_MNT} " /boot/* ; do
28
27
INFO " Executing $f "
29
28
if ! " $f " ; then
@@ -32,6 +31,11 @@ for f in "${LIMA_CIDATA_MNT}"/boot/*; do
32
31
fi
33
32
done
34
33
34
+ if [ -e /etc/environment ]; then
35
+ sed -i ' /#LIMA-START/,/#LIMA-END/d' /etc/environment
36
+ fi
37
+ cat " ${LIMA_CIDATA_MNT} /etc_environment" >> /etc/environment
38
+
35
39
if [ -d " ${LIMA_CIDATA_MNT} " /provision.system ]; then
36
40
for f in " ${LIMA_CIDATA_MNT} " /provision.system/* ; do
37
41
INFO " Executing $f "
File renamed without changes.
You can’t perform that action at this time.
0 commit comments