From 41e81fe4f0df9054ef2d9c05ec8dd69c42623dac Mon Sep 17 00:00:00 2001 From: Dylan Van Assche Date: Sun, 19 Feb 2023 18:41:27 +0100 Subject: [PATCH] main/postmarketos-bootsplash: launch splash on shutdown (MR 3884) Instead of a blank screen with a tty login prompt, show a proper shutdown screen during poweroff or reboot. --- .../99-shutdown-pbsplash.stop | 12 ++++++++++++ main/postmarketos-bootsplash/APKBUILD | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 main/postmarketos-bootsplash/99-shutdown-pbsplash.stop diff --git a/main/postmarketos-bootsplash/99-shutdown-pbsplash.stop b/main/postmarketos-bootsplash/99-shutdown-pbsplash.stop new file mode 100644 index 000000000..16b2d4f6e --- /dev/null +++ b/main/postmarketos-bootsplash/99-shutdown-pbsplash.stop @@ -0,0 +1,12 @@ +#!/bin/sh + +VT=7 + +# Retrieve device name +source /etc/deviceinfo + +# Run on separate VT to avoid interference of display managers +chvt "$VT" + +# Run splash +pbsplash -s /usr/share/pbsplash/pmos-logo-text.svg -b "Linux $(uname -r) | $deviceinfo_codename" -m "Shutting down..." & diff --git a/main/postmarketos-bootsplash/APKBUILD b/main/postmarketos-bootsplash/APKBUILD index 494f6e4ff..f0f0acdd4 100644 --- a/main/postmarketos-bootsplash/APKBUILD +++ b/main/postmarketos-bootsplash/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Caleb Connolly pkgname=postmarketos-bootsplash pkgver=0.2 -pkgrel=1 +pkgrel=2 pkgdesc="pmOS integration components for pbsplash" url="https://postmarketos.org" arch="all" @@ -11,6 +11,7 @@ options="!check" # no testsuite subpackages="$pkgname-openrc" source=" kill-pbsplash + 99-shutdown-pbsplash.stop OpenSans-Regular.svg pmos-logo.svg pmos-logo-text.svg @@ -20,6 +21,7 @@ source=" package() { install -Dm755 "$srcdir/kill-pbsplash" -t "$pkgdir"/etc/init.d/ + install -Dm755 "$srcdir/99-shutdown-pbsplash.stop" -t "$pkgdir"/etc/local.d/ install -Dm644 "$srcdir"/OpenSans-Regular.svg -t "$pkgdir"/usr/share/pbsplash/ install -Dm644 "$srcdir"/pmos-logo.svg -t "$pkgdir"/usr/share/pbsplash/ install -Dm644 "$srcdir"/pmos-logo-text.svg -t "$pkgdir"/usr/share/pbsplash/ @@ -35,6 +37,7 @@ openrc() { sha512sums=" 7e5416f0f9de3605dcbc5ddd4b93d244fd6d4fd1bc2d5a15a034263f8517fc51e73509f29f2a13397d059913917990ada89b36ac7b00a0d21c0283fade755c1c kill-pbsplash +c9828e82bbe9d768bfbc289ab14c8e3c56f56f866c5fece63f843963644a85f6ed390be08601a3776171b1b660435def53bd12ae4e59d7a66495306ca794f27d 99-shutdown-pbsplash.stop 2387c64d84f0ba3ee76925f55c87ce025140aa3cd462107a851c34ffd89bd52f606e0d1f9f371d4f642d96545d5cc1bc0fcfb23ca7629a9149055f068da6bffd OpenSans-Regular.svg 98984fd67b99400d2b08422c4d314da558d3c94ee67dbc895e7bbfd6fdf22d4b2c9d35f48f4b73b383a054f535d4089fb705c5532f034cb2ee54eab2184e8e86 pmos-logo.svg 1940480fb98ffd1cef17c0ed440d44aa200119d022ce59973a18fa39ee040b19e748312ae61edae4ff8d2bacf42b4d7c9144274b99cd8563e4a106447825b8f2 pmos-logo-text.svg