]> code.ossystems Code Review - openembedded-core.git/commitdiff
PSPLASH_FIFO_DIR: refactor
authorTrevor Woerner <twoerner@gmail.com>
Thu, 24 Dec 2020 15:31:03 +0000 (10:31 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 5 Jan 2021 13:48:06 +0000 (13:48 +0000)
Add an entry for the psplash fifo directory to /etc/default/rcS and have the
pieces of code that need it source it from there rather than duplicating the
definition in multiple places throughout the code.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/psplash/files/psplash-init
meta/recipes-core/sysvinit/sysvinit/rc
meta/recipes-core/sysvinit/sysvinit/rcS-default

index f58e043733e3b14f6ccd3d47aa3f2453b423846f..e0f80bcdc039fa22ac324e06261f18b849de9b28 100755 (executable)
@@ -7,6 +7,9 @@
 # Default-Stop:
 ### END INIT INFO
 
+. /etc/default/rcS
+export PSPLASH_FIFO_DIR
+
 if [ ! -e /dev/fb0 ]; then
     echo "Framebuffer /dev/fb0 not detected"
     echo "Boot splashscreen disabled"
@@ -23,7 +26,6 @@ for x in $CMDLINE; do
         esac
 done
 
-export PSPLASH_FIFO_DIR=/mnt/.psplash
 [ -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
index d0d314982156dbfa22b36a1c26eaea4c3f8585ea..c9f65581156843dd38479a23d144fe528a4d768a 100755 (executable)
@@ -17,6 +17,7 @@
 
 . /etc/default/rcS
 export VERBOSE
+export PSPLASH_FIFO_DIR
 
 startup_progress() {
     step=$(($step + $step_change))
@@ -27,7 +28,7 @@ startup_progress() {
     fi
     #echo "PROGRESS is $progress $runlevel $first_step + ($step of $num_steps) $step_change $progress_size"
     if type psplash-write >/dev/null 2>&1; then
-        PSPLASH_FIFO_DIR=/mnt/.psplash psplash-write "PROGRESS $progress" || true
+        psplash-write "PROGRESS $progress" || true
     fi
 }
 
@@ -173,7 +174,7 @@ startup() {
 #Uncomment to cause psplash to exit manually, otherwise it exits when it sees a VC switch
 if [ "x$runlevel" != "xS" ] && [ ! -x /etc/rc${runlevel}.d/S??xserver-nodm ]; then
     if type psplash-write >/dev/null 2>&1; then
-        PSPLASH_FIFO_DIR=/mnt/.psplash psplash-write "QUIT" || true
+        psplash-write "QUIT" || true
        umount -l /mnt/.psplash
     fi
 fi
index e608a77c7560a1e58c585c9e5aa3a70f147bbcc1..c576ff0678a53758c68d2bccf7c85707189aa82b 100644 (file)
@@ -30,3 +30,5 @@ ROOTFS_READ_ONLY=no
 # rcS is also used when using busybox init and shares initscripts, some initscripts
 # need to have specific behavior depending on init system
 INIT_SYSTEM=sysvinit
+# set the psplash fifo directory
+PSPLASH_FIFO_DIR=/mnt/.psplash