Skip to contentSkip to conversation

psplash: Do not mount PSPLASH_FIFO_DIR if the env variable is empty

PATCH New Falk Bauer 1 participant 1 message Aug 21, 2025

lore
Share & tools
lore

Falk Bauer

author
#0 lore raw

PATCH 1/1 psplash: Do not mount PSPLASH_FIFO_DIR if the env variable is empty

The script file psplash.sh tries to mount the PSPLASH_FIFO_DIR variable. If the variable is empty, the mountpoint command returns a usage text (busybox mountpoint here, util-linux mountpoint behaves the same):

BusyBox v1.37.0 () multi-call binary.
Usage: mountpoint [-q] { [-dn] DIR | -x DEVICE } :~# BusyBox v1.37.0 () multi-call binary

The return code with this console output is 0 and the mount command in the if statement is executed.
Then this mount also fails with an empty mountpoint argument.
The source code of psplash respects an empty PSPLASH_FIFO_DIR variable (see psplash.c) and makes a fallback to "/run". So the psplash.sh script should also respect the empty var.

Try to mount the PSPLASH_FIFO_DIR only if the variable is not empty.

---
 meta/recipes-core/psplash/files/psplash-init | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
meta/recipes-core/psplash/files/psplash-init +5 -3
index e0f80bcdc0..69496a48bf 100644
@@ -26,9 +26,11 @@ for x in $CMDLINE; do
         esac
 done
 
-[ -d $PSPLASH_FIFO_DIR ] || mkdir -p $PSPLASH_FIFO_DIR
-if ! mountpoint -q $PSPLASH_FIFO_DIR; then
-	mount tmpfs -t tmpfs $PSPLASH_FIFO_DIR -o,size=40k
+if [ -n "${PSPLASH_FIFO_DIR}" ]; then
+        [ -d $PSPLASH_FIFO_DIR ] || mkdir -p $PSPLASH_FIFO_DIR
+        if ! mountpoint -q $PSPLASH_FIFO_DIR ; then
+                mount tmpfs -t tmpfs $PSPLASH_FIFO_DIR -o,size=40k
+        fi
 fi
 
 rotation=0
Signature · 1 line
2.51.0