#!/bin/sh
set -e
# Walnut is the theme (no initramfs to rebuild: Plymouth starts from the root filesystem)
if [ "$1" = configure ] && command -v plymouth-set-default-theme >/dev/null; then
	plymouth-set-default-theme walnut || true
	# Plymouth's DRM renderer can't use ps3rsx during boot, and with udev it falls back to ps3fb's
	# framebuffer only after DeviceTimeout (8 s by default): 1 s puts the splash up at once
	c=/etc/plymouth/plymouthd.conf
	if [ -e "$c" ]; then
		if grep -q '^DeviceTimeout=' "$c"; then
			sed -i 's/^DeviceTimeout=.*/DeviceTimeout=1/' "$c"
		else
			sed -i '/^\[Daemon\]/a DeviceTimeout=1' "$c"
		fi
	fi
fi
#DEBHELPER#
exit 0
