summaryrefslogtreecommitdiffstats
path: root/modules.d/slx-splash/scripts/splashtool
diff options
context:
space:
mode:
authorSimon Rettberg2022-03-01 14:05:14 +0100
committerSimon Rettberg2022-03-01 14:05:14 +0100
commit546d5401b95e2fc09bdf776ba400a7631b8e798d (patch)
tree97dd0b70e7b6e27ee755d991cb8de7eca3bd4eb0 /modules.d/slx-splash/scripts/splashtool
parent[slx-splash] Fix splash.ppm path (diff)
downloadsystemd-init-546d5401b95e2fc09bdf776ba400a7631b8e798d.tar.gz
systemd-init-546d5401b95e2fc09bdf776ba400a7631b8e798d.tar.xz
systemd-init-546d5401b95e2fc09bdf776ba400a7631b8e798d.zip
[slx-splash] Update splashtool (bugfix for ppm with comments)
Diffstat (limited to 'modules.d/slx-splash/scripts/splashtool')
-rwxr-xr-xmodules.d/slx-splash/scripts/splashtool6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules.d/slx-splash/scripts/splashtool b/modules.d/slx-splash/scripts/splashtool
index fa348372..69a76a40 100755
--- a/modules.d/slx-splash/scripts/splashtool
+++ b/modules.d/slx-splash/scripts/splashtool
@@ -14,8 +14,6 @@
# specific icon in its active state. Will assume the
# screen stays intact between calls.
-grep -wqE 'splash' /proc/cmdline || exit 0
-
ICON_SIZE=64
unset mode ppm base index
@@ -133,9 +131,9 @@ else
ppm="${ppm}.gz"
fi
if [ "${ppm%.gz}" != "${ppm}" ]; then
- ppm_size="$(zcat "$ppm" | sed -n 2p)"
+ ppm_size="$( < "$ppm" zcat | head -n 5 | grep -v '^#' | sed -n 2p )"
else
- ppm_size="$(sed -n 2p "$ppm")"
+ ppm_size="$( < "$ppm" head -n 5 | grep -v '^#' | sed -n 2p )"
fi
if [ -z "$ppm_size" ]; then
echo "Invalid ppm? Could not extract dimensions" >&2