blob: 33a84601f89c2017a91c78994cd342a3b3805dfd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Copyright 2004-2009 Sabayon Project
# Copyright 2012 Rogentos
# Distributed under the terms of the GNU General Public License v2
# Original Authors: Sabayon Team
# Maintainer BlackNoxis <stefan.cristian at rogentos.ro>
# $
inherit eutils
# @ECLASS-VARIABLE: KERN_INITRAMFS_SEARCH_NAME
# @DESCRIPTION:
# Argument used by `find` to search inside ${ROOT}boot Linux
# Kernel initramfs files to patch
KERN_INITRAMFS_SEARCH_NAME="${KERN_INITRAMFS_SEARCH_NAME:-initramfs-genkernel*}"
# @ECLASS-VARIABLE: GFX_SPLASH_NAME
# @DESCRIPTION:
# Default splash theme name to use
GFX_SPLASH_NAME="${GFX_SPLASH_NAME:-rogentos}"
# @ECLASS-VARIABLE: PLYMOUTH_THEME
# @DESCRIPTION:
# Default plymouth theme name to use
PLYMOUTH_THEME="${PLYMOUTH_THEME:-rogentos}"
# @FUNCTION: update_kernel_initramfs_splash
# @USAGE: update_kernel_initramfs_splash [splash_theme] [splash_file]
# @RETURN: 1, if something went wrong
#
# @MAINTAINER:
# Brindusa Stefan Cristian
# @AUTHOR:
# Fabio Erculiani
update_kernel_initramfs_splash() {
[[ -z "${2}" ]] && die "wrong update_kernel_splash arguments"
if ! has_version "media-gfx/splashutils"; then
ewarn "media-gfx/splashutils not found, cannot update kernel splash"
return 1
fi
splash_geninitramfs -a "${2}" ${1}
return ${?}
}
# @FUNCTION: _update_kogaionkernel_initramfs_splash
# @USAGE: _update_kogaionkernel_initramfs_splash
#
# @AUTHOR:
# Fabio Erculiani
# @MAINTAINER:
# Brindusa Stefan Cristian
_update_kogaionkernel_initramfs_splash() {
local splash_name="${GFX_SPLASH_NAME}"
local override_splash_file="${ROOT}etc/${splash_name}"
if [ -f "${override_splash_file}" ]; then
found_splash_name=$(cat "${override_splash_file}" | cut -d" " -f 1)
if [ -d "/etc/splash/${found_splash_name}" ]; then
splash_name="${found_splash_name}"
fi
fi
for bootfile in `find ${ROOT}boot -name "${KERN_INITRAMFS_SEARCH_NAME}"`; do
einfo "Updating boot splash for ${bootfile}"
update_kernel_initramfs_splash "${GFX_SPLASH_NAME}" "${bootfile}"
done
}
|