Path: blob/master/pkg/cidata/cidata.TEMPLATE.d/boot/00-modprobe.sh
2655 views
#!/bin/sh12# SPDX-FileCopyrightText: Copyright The Lima Authors3# SPDX-License-Identifier: Apache-2.045# Load modules as soon as the cloud-init starts up.6# Because Arch Linux removes kernel module files when the kernel package was updated during running cloud-init :(78set -eu910command -v modprobe >/dev/null 2>&1 || exit 01112for f in \13fuse \14tun tap \15bridge veth \16ip_tables ip6_tables iptable_nat ip6table_nat iptable_filter ip6table_filter \17nf_tables \18x_tables xt_MASQUERADE xt_addrtype xt_comment xt_conntrack xt_mark xt_multiport xt_nat xt_tcpudp \19overlay; do20echo "Loading kernel module \"$f\""21if ! modprobe "$f"; then22echo >&2 "Failed to load \"$f\" (negligible if it is built-in the kernel)"23fi24done252627