Skip to content

Commit 2151223

Browse files
committed
Rename lima.environment → etc_environment
Also add documentation entry for `etc_environment` and fix an unrelated typo (but benign) in the script. Signed-off-by: Jan Dubois <[email protected]>
1 parent af5fd10 commit 2151223

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

docs/internal.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,14 @@ The directory contains the following files:
8686
- `user-data`: [Cloud-init user-data](https://cloudinit.readthedocs.io/en/latest/topics/format.html)
8787
- `meta-data`: [Cloud-init meta-data](https://cloudinit.readthedocs.io/en/latest/topics/instancedata.html)
8888
- `network-config`: [Cloud-init Networking Config Version 2](https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v2.html)
89-
- `lima.env`: the environment variables
89+
- `lima.env`: The `LIMA_CIDATA_*` environment variables (see below) available during `boot.sh` processing
9090
- `lima-guestagent`: Lima guest agent binary
9191
- `nerdctl-full.tgz`: [`nerdctl-full-<VERSION>-linux-<ARCH>.tar.gz`](https://github.com/containerd/nerdctl/releases)
9292
- `boot.sh`: Boot script
9393
- `boot/*`: Boot script modules
9494
- `provision.system/*`: Custom provision scripts (system)
9595
- `provision.user/*`: Custom provision scripts (user)
96+
- `etc_environment`: Environment variables to be added to `/etc/environment` (also loaded during `boot.sh`)
9697

9798
Max file name length = 30
9899

pkg/cidata/cidata.TEMPLATE.d/boot.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ WARNING() {
1313
while read -r line; do export "$line"; done <"${LIMA_CIDATA_MNT}"/lima.env
1414

1515
sed -i '/#LIMA-START/,/#LIMA-END/d' /etc/environment
16-
cat "${LIMA_CIDATA_MNT}/lima.environment" >>/etc/environment
16+
cat "${LIMA_CIDATA_MNT}/etc_environment" >>/etc/environment
1717

1818
# shellcheck disable=SC2163
1919
while read -r line; do
2020
[ "$(expr "$line" : '#')" -eq 0 ] && export "$line"
21-
done <"${LIMA_CIDATA_MNT}"/lima.environment
21+
done <"${LIMA_CIDATA_MNT}"/etc_environment
2222

2323
CODE=0
2424

@@ -40,7 +40,7 @@ if [ -d "${LIMA_CIDATA_MNT}"/provision.system ]; then
4040
done
4141
fi
4242

43-
USER_SCRIPT="/home/${LIMA_CIDATA_USER}.linux/.lime-user-script"
43+
USER_SCRIPT="/home/${LIMA_CIDATA_USER}.linux/.lima-user-script"
4444
if [ -d "${LIMA_CIDATA_MNT}"/provision.user ]; then
4545
until [ -e "/run/user/${LIMA_CIDATA_UID}/systemd/private" ]; do sleep 3; done
4646
for f in "${LIMA_CIDATA_MNT}"/provision.user/*; do

0 commit comments

Comments
 (0)