File tree Expand file tree Collapse file tree 2 files changed +15
-18
lines changed
pkg/cidata/cidata.TEMPLATE.d Expand file tree Collapse file tree 2 files changed +15
-18
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,21 @@ chown "{{.User}}" /run/user/{{.UID}}
32
32
chmod 700 /run/user/{{.UID}}
33
33
34
34
# Install the openrc lima-guestagent service script
35
- mv /var/lib/lima-guestagent/lima-guestagent.openrc /etc/init.d/lima-guestagent
35
+ cat > /etc/init.d/lima-guestagent << 'EOF '
36
+ #!/sbin/openrc-run
37
+ supervisor=supervise-daemon
38
+
39
+ name="lima-guestagent"
40
+ description="Forward ports to the lima-hostagent"
41
+
42
+ export XDG_RUNTIME_DIR="/run/user/{{.UID}}"
43
+ command=/usr/local/bin/lima-guestagent
44
+ command_args="daemon"
45
+ command_background=true
46
+ command_user="{{.User}}:{{.User}}"
47
+ pidfile="${XDG_RUNTIME_DIR}/lima-guestagent.pid"
48
+ EOF
49
+ chmod 755 /etc/init.d/lima-guestagent
36
50
37
51
# mount /sys/fs/cgroup
38
52
rc-service cgroups start
Original file line number Diff line number Diff line change @@ -38,23 +38,6 @@ write_files:
38
38
owner: root:root
39
39
path: /var/lib/cloud/scripts/per-boot/00-lima.boot.sh
40
40
permissions: '0755'
41
- # TODO: embed lima-guestagent.openrc in 10-alpine-prep.boot.sh
42
- - content : |
43
- #!/sbin/openrc-run
44
- supervisor=supervise-daemon
45
-
46
- name="lima-guestagent"
47
- description="Forward ports to the lima-hostagent"
48
-
49
- export XDG_RUNTIME_DIR="/run/user/{{.UID}}"
50
- command=/usr/local/bin/lima-guestagent
51
- command_args="daemon"
52
- command_background=true
53
- command_user="{{.User}}:{{.User}}"
54
- pidfile="${XDG_RUNTIME_DIR}/lima-guestagent.pid"
55
- owner: root:root
56
- path: /var/lib/lima-guestagent/lima-guestagent.openrc
57
- permissions: '0755'
58
41
{{- if .Provision}}
59
42
# TODO: move Provision scripts to ISO
60
43
- content : |
You can’t perform that action at this time.
0 commit comments