Skip to content

Commit fdc54e0

Browse files
authored
Merge pull request #3579 from songponssw/fix-alpine-guestagent-rc
Fix guestagent service file
2 parents 6e28122 + 5ce662d commit fdc54e0

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)