]> git.kernelconcepts.de Git - meta-kc-bsp.git/commitdiff
dotsplash: Improve start script and psplash compatibility
authorFlorian Boor <florian.boor@kernelconcepts.de>
Thu, 6 Jun 2019 12:54:49 +0000 (14:54 +0200)
committerFlorian Boor <florian.boor@kernelconcepts.de>
Thu, 6 Jun 2019 12:54:49 +0000 (14:54 +0200)
recipes-bsp/dotsplash/dotsplash_git.bb
recipes-bsp/dotsplash/files/dotsplash-init
recipes-bsp/dotsplash/files/splashfuncs

index 7bbe11e31aa53e62b1ad37fec11ed4ca51e8c4ee..6bce9d6c9f10d33d631fb7c894fc78d6fdfd890d 100644 (file)
@@ -1,7 +1,7 @@
 SUMMARY = "./dotsplash - a tiny and customizable splash screen"
 LICENSE = "GPLv2"
 PV = "1.0+git${SRCPV}"
 SUMMARY = "./dotsplash - a tiny and customizable splash screen"
 LICENSE = "GPLv2"
 PV = "1.0+git${SRCPV}"
-SRCREV = "eac58fd508efaa3215094085daa06a58d6d7a75c"
+SRCREV = "1555cb1a1c68c5c5536c3222ecd73783f7d9e74d"
 
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=39bba7d2cf0ba1036f2a6e2be52fe3f0"
 
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=39bba7d2cf0ba1036f2a6e2be52fe3f0"
@@ -16,18 +16,20 @@ inherit pkgconfig update-rc.d meson
 
 S = "${WORKDIR}/git"
 
 
 S = "${WORKDIR}/git"
 
-FILES_${PN} += "/mnt/.dotsplash/"
+FILES_${PN} += "/mnt/.psplash/"
 
 PACKAGES =+ "${PN}-themes"
 FILES_${PN}-themes += "${datadir}/dotsplash/themes/*"
 
 do_install_append() {
 
 PACKAGES =+ "${PN}-themes"
 FILES_${PN}-themes += "${datadir}/dotsplash/themes/*"
 
 do_install_append() {
-    install -d ${D}/mnt/.dotsplash/
+    install -d ${D}/mnt/.psplash/
     install -d ${D}${sysconfdir}/init.d/
     install -m 0755 ${WORKDIR}/dotsplash-init ${D}${sysconfdir}/init.d/dotsplash.sh
     install -d ${D}${sysconfdir}/default/
     install -m 0644 ${WORKDIR}/dotsplash-default ${D}${sysconfdir}/default/dotsplash
     install -m 0755 ${WORKDIR}/splashfuncs ${D}${sysconfdir}/default/splashfuncs
     install -d ${D}${sysconfdir}/init.d/
     install -m 0755 ${WORKDIR}/dotsplash-init ${D}${sysconfdir}/init.d/dotsplash.sh
     install -d ${D}${sysconfdir}/default/
     install -m 0644 ${WORKDIR}/dotsplash-default ${D}${sysconfdir}/default/dotsplash
     install -m 0755 ${WORKDIR}/splashfuncs ${D}${sysconfdir}/default/splashfuncs
+    cd ${D}/${bindir}
+    ln -s dotsplash-write psplash-write
 }
 
 INITSCRIPT_NAME = "dotsplash.sh"
 }
 
 INITSCRIPT_NAME = "dotsplash.sh"
index 27a1ba05e10d3c5d2790f1a56209df5f81a5f267..1f7f77f69be24c5d197074b7921e54d22fe89168 100644 (file)
@@ -1,5 +1,10 @@
 #!/bin/sh 
 
 #!/bin/sh 
 
+killproc() {            # kill the named process(es)
+        pid=`/bin/pidof $1`
+        [ "$pid" != "" ] && kill $pid
+}
+
 if grep -qE '\s?psplash=false\s?' /proc/cmdline; then
        echo "Boot splashscreen disabled"
        exit 0;
 if grep -qE '\s?psplash=false\s?' /proc/cmdline; then
        echo "Boot splashscreen disabled"
        exit 0;
@@ -8,10 +13,25 @@ fi
 . /etc/init.d/functions
 . /etc/default/dotsplash
 
 . /etc/init.d/functions
 . /etc/default/dotsplash
 
-export TMPDIR=/mnt/.splash
-mount tmpfs -t tmpfs $TMPDIR -o,size=40k
+export TMPDIR=/mnt/.psplash
+
+case "$1" in
+  start)
+       mount tmpfs -t tmpfs $TMPDIR -o,size=40k
+       /usr/bin/dotsplash $PARAMS &
 
 
-/usr/bin/dotsplash $PARAMS &
+       # Timetrap against hanging with splash hiding console messages.
+       (sleep 60; dotsplash-write "QUIT"; sleep 1 ; killall dotsplash) &
+  ;;
+  
+  stop)
+        killproc dotsplash
+        umount $TMPDIR
+  ;;
 
 
-# Timetrap against hanging with splash hiding console messages.
-(sleep 120; dotsplash-write "QUIT") &
+  restart)
+        $0 stop
+        $0 start
+  ;;
+  
+esac
\ No newline at end of file
index ada2a96dd419b2d2f6395ae3624e323b742cb770..7a617682a52a1523b9e04fd5043dfbccd70bea4b 100644 (file)
@@ -1,6 +1,6 @@
 status() {
   if type splash-write >/dev/null 2>&1; then
 status() {
   if type splash-write >/dev/null 2>&1; then
-    (TMPDIR="/mnt/.splash" EXQUISITE_IPC="$TMPDIR/exquisite" splash-write "$1" || true) &
+    (TMPDIR="/mnt/.psplash" EXQUISITE_IPC="$TMPDIR/exquisite" splash-write "$1" || true) &
   fi
 }
 
   fi
 }