From: Ross Burton Date: Thu, 13 Nov 2025 16:34:38 +0000 (+0000) Subject: initscripts: don't read /proc/cmdline in populate-volatile during build X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52a6a9f23587cab65c76b6e9c9ec9721563854e0;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git initscripts: don't read /proc/cmdline in populate-volatile during build The populate-volatile script will check for "clearcache" in the kernel command line and wipe the caches if it has been set. This is useful at boot, but we shouldn't be checking the kernel commandline when being ran on the build machine at rootfs-time. [ YOCTO #16056 ] Signed-off-by: Ross Burton Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh index bc630e871c1..8b0139c094f 100755 --- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh @@ -220,17 +220,19 @@ apply_cfgfile() { } clearcache=0 -exec 9&- +if test -z "$ROOT_DIR"; then + exec 9&- +fi if test -e "${ROOT_DIR}/etc/volatile.cache" -a "$VOLATILE_ENABLE_CACHE" = "yes" -a "x$1" != "xupdate" -a "x$clearcache" = "x0" then