Commit 95c11400 authored by Arie Peterson's avatar Arie Peterson 🐚
Browse files

Create tmpfs mount only if modules tarball is present

parent 19a40535
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -337,9 +337,11 @@ unset fsckfix
mount -n -o move /sys ${rootmnt}/sys
mount -n -o move /proc ${rootmnt}/proc

if [ -e /modules.tgz ]; then
    mount -t tmpfs -o size=100M,mode=0700 modules ${rootmnt}/lib/modules/
    cd ${rootmnt}/lib/modules/
    tar xfz /modules.tgz
fi

# Chain to real filesystem
if [ -z "$drop_caps" ] && command -v switch_root >/dev/null 2>&1; then