Skip to content

Commit 5ce662d

Browse files
songponsswjandubois
andcommitted
Add conf.d for lima-guestagent service
Co-authored-by: Jan Dubois <[email protected]> Signed-off-by: Songpon Srisawai <[email protected]>
1 parent 7224ca4 commit 5ce662d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/cidata/cidata.TEMPLATE.d/boot/25-guestagent-base.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ install -m 755 "${LIMA_CIDATA_MNT}"/lima-guestagent "${LIMA_CIDATA_GUEST_INSTALL
2222

2323
# Launch the guestagent service
2424
if [ -f /sbin/openrc-run ]; then
25+
# Convert .env to conf.d by wrapping values in double quotes.
26+
# Split the variable and value at the first "=" to handle cases where the value contains additional "=" characters.
27+
sed -E 's/^([^=]+)=(.*)/\1="\2"/' "${LIMA_CIDATA_MNT}/lima.env" >"/etc/conf.d/lima-guestagent"
2528
# Install the openrc lima-guestagent service script
2629
cat >/etc/init.d/lima-guestagent <<'EOF'
2730
#!/sbin/openrc-run

0 commit comments

Comments
 (0)