Skip to content

Commit 4510504

Browse files
committed
Skip loading modules if modprobe is missing
Some distributions or kernels don't use modules, only built-in, and don't even have "modprobe" installed. So avoid long logs. Signed-off-by: Anders F Björklund <[email protected]>
1 parent 170824e commit 4510504

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/cidata/cidata.TEMPLATE.d/boot/00-modprobe.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
# Because Arch Linux removes kernel module files when the kernel package was updated during running cloud-init :(
88

99
set -eu
10+
11+
command -v modprobe >/dev/null 2>&1 || exit 0
12+
1013
for f in \
1114
fuse \
1215
tun tap \

0 commit comments

Comments
 (0)