File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
pkg/cidata/cidata.TEMPLATE.d/boot Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 4
4
# /etc/environment must be written after 04-persistent-data-volume.sh has run to
5
5
# make sure the changes on a restart are applied to the persisted version.
6
6
7
+ orig=$( test -f /etc/environment && cat /etc/environment)
7
8
if [ -e /etc/environment ]; then
8
9
sed -i ' /#LIMA-START/,/#LIMA-END/d' /etc/environment
9
10
fi
@@ -13,13 +14,10 @@ cat "${LIMA_CIDATA_MNT}/etc_environment" >>/etc/environment
13
14
# /etc/environment was updated, so we need to kill it to make sure it will
14
15
# restart with the updated environment before "linger" is being enabled.
15
16
16
- if command -v loginctl > /dev/null 2>&1 ; then
17
+ if command -v loginctl > /dev/null 2>&1 && [ " ${orig} " != " $( cat /etc/environment ) " ] ; then
17
18
loginctl terminate-user " ${LIMA_CIDATA_USER} " || true
18
19
fi
19
20
20
- # Make sure the guestagent socket from a previous boot is removed before we open the "lima-ssh-ready" gate.
21
- rm -f /run/lima-guest-agent.sock
22
-
23
21
# Signal that provisioning is done. The instance-id in the meta-data file changes on every boot,
24
22
# so any copy from a previous boot cycle will have different content.
25
23
cp " ${LIMA_CIDATA_MNT} " /meta-data /run/lima-ssh-ready
You can’t perform that action at this time.
0 commit comments