File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
pkg/cidata/cidata.TEMPLATE.d/boot Expand file tree Collapse file tree 1 file changed +2
-1
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,7 +14,7 @@ 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
You can’t perform that action at this time.
0 commit comments