File tree Expand file tree Collapse file tree 1 file changed +22
-9
lines changed
Expand file tree Collapse file tree 1 file changed +22
-9
lines changed Original file line number Diff line number Diff line change @@ -73,19 +73,32 @@ rc_add networking default
7373
7474rc_add sshd default
7575
76- rc_add local default
76+ # lima-overlay must run with the boot filesystem, so has to run before
77+ # cloud-init or lima-init because the boot script will remap /etc and
78+ # /var/lib to the data volume.
79+
80+ mkdir -p " ${tmp} /etc/init.d/"
81+ makefile root:root 0755 " $tmp /etc/init.d/lima-overlay" << EOF
82+ #!/sbin/openrc-run
83+
84+ depend() {
85+ after localmount
86+ before cloud-init-local lima-init-local sshd
87+ provide lima-overlay
88+ }
7789
78- mkdir -p " ${tmp} /etc/local.d/"
79- makefile root:root 0755 " $tmp /etc/local.d/lima.start" << EOF
80- sed -i 's/#UsePAM no/UsePAM yes/g' /etc/ssh/sshd_config
81- rc-service --ifstarted sshd reload
90+ start() {
91+ sed -i 's/#UsePAM no/UsePAM yes/g' /etc/ssh/sshd_config
8292
83- if ! grep -q BUILD_ID /etc/os-release; then
84- echo "BUILD_ID=\"${LIMA_BUILD_ID} \"" >> /etc/os-release
85- echo "VARIANT_ID=\"${LIMA_VARIANT_ID} \"" >> /etc/os-release
86- fi
93+ echo "BUILD_ID=\"${LIMA_BUILD_ID} \"" >> /etc/os-release
94+ echo "VARIANT_ID=\"${LIMA_VARIANT_ID} \"" >> /etc/os-release
95+
96+ eend 0
97+ }
8798EOF
8899
100+ rc_add lima-overlay default
101+
89102mkdir -p " $tmp " /etc/pam.d
90103cp /home/build/sshd.pam " ${tmp} /etc/pam.d/sshd"
91104
You can’t perform that action at this time.
0 commit comments