summarylogtreecommitdiffstats
path: root/fbsplash.hook
blob: a33d2f05d950111e884f027f856576d4d1d85424 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /usr/bin/bash

# Copies the splash image into the framebuffer device
run_hook() {
    local FBDEV="/dev/fb0"
    local SPLASH_IMAGE="/etc/splash.fb"

    if [ -c "${FBDEV}" ]; then
        if [ -f "${SPLASH_IMAGE}" ]; then
            dd if="${SPLASH_IMAGE}" of="${FBDEV}" 2> /dev/null
        else
            echo "Cannot find ${SPLASH_IMAGE}." >&2
            echo "Did you include it in the \"FILES=...\" of your /etc/mkinitcpio.conf?" >&2
        fi
    else
        echo "Framebuffer device \"${FBDEV}\" is not present." >&2
    fi
}