All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Trevor Woerner" <twoerner@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [master-next][PATCH 1/3] PSPLASH_FIFO_DIR: refactor
Date: Thu, 24 Dec 2020 10:31:03 -0500	[thread overview]
Message-ID: <20201224153105.21211-1-twoerner@gmail.com> (raw)

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>
---
 meta/recipes-core/psplash/files/psplash-init    | 4 +++-
 meta/recipes-core/sysvinit/sysvinit/rc          | 5 +++--
 meta/recipes-core/sysvinit/sysvinit/rcS-default | 2 ++
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/psplash/files/psplash-init b/meta/recipes-core/psplash/files/psplash-init
index f58e043733..e0f80bcdc0 100755
--- a/meta/recipes-core/psplash/files/psplash-init
+++ b/meta/recipes-core/psplash/files/psplash-init
@@ -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
diff --git a/meta/recipes-core/sysvinit/sysvinit/rc b/meta/recipes-core/sysvinit/sysvinit/rc
index d0d3149821..c9f6558115 100755
--- a/meta/recipes-core/sysvinit/sysvinit/rc
+++ b/meta/recipes-core/sysvinit/sysvinit/rc
@@ -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
diff --git a/meta/recipes-core/sysvinit/sysvinit/rcS-default b/meta/recipes-core/sysvinit/sysvinit/rcS-default
index e608a77c75..c576ff0678 100644
--- a/meta/recipes-core/sysvinit/sysvinit/rcS-default
+++ b/meta/recipes-core/sysvinit/sysvinit/rcS-default
@@ -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
-- 
2.30.0.rc0


             reply	other threads:[~2020-12-24 15:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-24 15:31 Trevor Woerner [this message]
2020-12-24 15:31 ` [master-next][PATCH 2/3] psplash: fix working on first boot (sysvinit) Trevor Woerner
2020-12-24 15:31 ` [master-next][PATCH 3/3] psplash (sysvinit): add textual updates Trevor Woerner
2020-12-30 14:10 ` [OE-core] [master-next][PATCH 1/3] PSPLASH_FIFO_DIR: refactor Richard Purdie
2020-12-31  7:55   ` Naveen Saini
  -- strict thread matches above, loose matches on Subject: below --
2020-12-23 17:06 Trevor Woerner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201224153105.21211-1-twoerner@gmail.com \
    --to=twoerner@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.