Path: blob/master/pkg/cidata/cidata.TEMPLATE.d/boot/35-setup-packages.sh
2655 views
#!/bin/sh12# SPDX-FileCopyrightText: Copyright The Lima Authors3# SPDX-License-Identifier: Apache-2.045set -eux67update_fuse_conf() {8# Modify /etc/fuse.conf (/etc/fuse3.conf) to allow "-o allow_root"9if [ "${LIMA_CIDATA_MOUNTS}" -gt 0 ]; then10fuse_conf="/etc/fuse.conf"11if [ -e /etc/fuse3.conf ]; then12fuse_conf="/etc/fuse3.conf"13fi14if ! grep -q "^user_allow_other" "${fuse_conf}"; then15echo "user_allow_other" >>"${fuse_conf}"16fi17fi18}1920# update_fuse_conf has to be called after installing all the packages,21# otherwise apt-get fails with conflict22if [ "${LIMA_CIDATA_MOUNTTYPE}" = "reverse-sshfs" ]; then23update_fuse_conf24fi2526SETUP_DNS=027if [ -n "${LIMA_CIDATA_UDP_DNS_LOCAL_PORT}" ] && [ "${LIMA_CIDATA_UDP_DNS_LOCAL_PORT}" -ne 0 ]; then28SETUP_DNS=129fi30if [ -n "${LIMA_CIDATA_TCP_DNS_LOCAL_PORT}" ] && [ "${LIMA_CIDATA_TCP_DNS_LOCAL_PORT}" -ne 0 ]; then31SETUP_DNS=132fi33if [ "${SETUP_DNS}" = 1 ]; then34# Try to setup iptables rule again, in case we just installed iptables35"${LIMA_CIDATA_MNT}/boot/09-host-dns-setup.sh"36fi373839