Skip to content

Commit d0cd7cd

Browse files
FGrosejohannbg
authored andcommitted
fix(dmsquash-live-root): check kernel for built-in overlay drivers
Do not assume that `overlay` is always a module. Check first for `overlay` in `/proc/filesystems`. This is needed in the --no-kernel use case to avoid the error: modprobe: FATAL: Module overlay not found in directory /lib/modules/<kver> Signed-off-by: Federico Vaga <[email protected]>
1 parent 5a5f9c5 commit d0cd7cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules.d/90dmsquash-live/dmsquash-live-root.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ do_live_overlay() {
177177
fi
178178
fi
179179
if [ -n "$overlayfs" ]; then
180-
if ! modprobe overlay; then
180+
if ! { strstr "$(< /proc/filesystems)" overlay || modprobe overlay; }; then
181181
if [ "$overlayfs" = required ]; then
182182
die "OverlayFS is required but not available."
183183
exit 1

0 commit comments

Comments
 (0)