5 # TODO: splash_geninitramfs
6 # TODO: /usr/share/splashutils/initrd.splash
21 call_splash_geninitramfs
() {
24 _out
=$
(splash_geninitramfs
-c "$1" ${@:2} 2>&1)
27 if [[ ${_out} ]]; then
30 for line
in ${_out}; do
31 if [[ ${line} =~ ^Warning
]]; then
35 (( $_ret == 0 )) && _ret
=1
43 type -P splash_geninitramfs
>/dev
/null ||
return 1
46 if [[ ${DRACUT_GENSPLASH_THEME} ]]; then
47 # Variables from the environment
48 # They're supposed to be set up by e.g. Genkernel in basis of cmdline args.
49 # If user set them he/she would expect to be included only given theme
50 # rather then all even if we're building generic initramfs.
51 _splash_theme
=${DRACUT_GENSPLASH_THEME}
52 _splash_res
=${DRACUT_GENSPLASH_RES}
53 elif [[ ${hostonly} ]]; then
54 # Settings from config only in hostonly
55 [[ -e /etc
/conf.d
/splash
]] && source /etc
/conf.d
/splash
56 [[ ! ${_splash_theme} ]] && _splash_theme
=default
57 [[ ${_splash_res} ]] && _opts
+=" -r ${_splash_res}"
63 dinfo
"Installing Gentoo Splash (using the ${_splash_theme} theme)"
65 pushd "${initdir}" >/dev
/null
67 call_splash_geninitramfs
"${initdir}" ${_opts} ${_splash_theme} || {
68 derror "Could not build splash
"
76 inst /usr/share/splashutils/initrd.splash /lib/gensplash-lib.sh
77 inst_hook pre-pivot 90 "${moddir}"/gensplash-newroot.sh
78 inst_hook pre-trigger 10 "${moddir}"/gensplash-pretrigger.sh
79 inst_hook emergency 50 "${moddir}"/gensplash-emergency.sh