#!/bin/sh
# Launch plymouth daemon if necessary

. "${PM_FUNCTIONS}"

# Fail if no plymouthd
command_exists plymouthd || exit $NA

# Check for splash parameter in /proc/cmdline
grep -qw "splash" /proc/cmdline || exit $NA

launch_plymouthd()
{
    /sbin/plymouthd --mode=suspend
    return 0
}

case "$1" in
    hibernate|suspend)
        launch_plymouthd
        ;;
    *) exit $NA
        ;;
esac
