25 |
|
|
26 |
helper_get_boot_splash_plymouth() |
helper_get_boot_splash_plymouth() |
27 |
{ |
{ |
28 |
if grep "^export GRUB_CMDLINE_BOOTSPLASH=.*splash" /etc/conf.d/grub |
if grep "^export GRUB_CMDLINE_BOOTSPLASH=.*splash" ${MROOT}/etc/conf.d/grub |
29 |
then |
then |
30 |
mecho "bootsplash currently enabled" |
mecho "bootsplash currently enabled" |
31 |
rvecho "1" |
rvecho "1" |
38 |
helper_get_boot_splash_fbsplash() |
helper_get_boot_splash_fbsplash() |
39 |
{ |
{ |
40 |
local var |
local var |
41 |
var=$(grep "^export GRUB_CMDLINE_BOOTSPLASH=" /etc/conf.d/grub | sed "s:.*splash=\(.*\),.*:\1:") |
var=$(grep "^export GRUB_CMDLINE_BOOTSPLASH=" ${MROOT}/etc/conf.d/grub | sed "s:.*splash=\(.*\),.*:\1:") |
42 |
|
|
43 |
case "${var}" in |
case "${var}" in |
44 |
silent|"") mecho "bootsplash currently enabled"; rvecho "1" ;; |
silent|"") mecho "bootsplash currently enabled"; rvecho "1" ;; |
64 |
|
|
65 |
case "${action}" in |
case "${action}" in |
66 |
enable) |
enable) |
67 |
sed -i "s:^\(export GRUB_CMDLINE_BOOTSPLASH=\).*:\1\"splash\":" /etc/conf.d/grub |
sed -i "s:^\(export GRUB_CMDLINE_BOOTSPLASH=\).*:\1\"splash\":" ${MROOT}/etc/conf.d/grub |
68 |
helper_boot_rebuild_bootconfig |
helper_boot_rebuild_bootconfig |
69 |
mecho "bootsplash enabled" |
mecho "bootsplash enabled" |
70 |
;; |
;; |
71 |
disable) |
disable) |
72 |
sed -i "s:^\(export GRUB_CMDLINE_BOOTSPLASH=\).*:\1\"rd.plymouth=0\":" /etc/conf.d/grub |
sed -i "s:^\(export GRUB_CMDLINE_BOOTSPLASH=\).*:\1\"rd.plymouth=0\":" ${MROOT}/etc/conf.d/grub |
73 |
helper_boot_rebuild_bootconfig |
helper_boot_rebuild_bootconfig |
74 |
mecho "bootsplash disabled" |
mecho "bootsplash disabled" |
75 |
;; |
;; |
84 |
|
|
85 |
case "${action}" in |
case "${action}" in |
86 |
enable) |
enable) |
87 |
sed -i "s:^\(export GRUB_CMDLINE_BOOTSPLASH=\).*:\1\"splash=silent,theme=default\":" /etc/conf.d/grub |
sed -i "s:^\(export GRUB_CMDLINE_BOOTSPLASH=\).*:\1\"splash=silent,theme=default\":" ${MROOT}/etc/conf.d/grub |
88 |
helper_boot_rebuild_bootconfig |
helper_boot_rebuild_bootconfig |
89 |
mecho "bootsplash enabled" |
mecho "bootsplash enabled" |
90 |
;; |
;; |
91 |
disable) |
disable) |
92 |
sed -i "s:^\(export GRUB_CMDLINE_BOOTSPLASH=\).*:\1\"splash=verbose,theme=default\":" /etc/conf.d/grub |
sed -i "s:^\(export GRUB_CMDLINE_BOOTSPLASH=\).*:\1\"splash=verbose,theme=default\":" ${MROOT}/etc/conf.d/grub |
93 |
helper_boot_rebuild_bootconfig |
helper_boot_rebuild_bootconfig |
94 |
mecho "bootsplash disabled" |
mecho "bootsplash disabled" |
95 |
;; |
;; |
142 |
helper_get_boot_theme_fbsplash() |
helper_get_boot_theme_fbsplash() |
143 |
{ |
{ |
144 |
local action="$1" |
local action="$1" |
145 |
local themedir="/etc/splash/themes" |
local themedir="${MROOT}/etc/splash/themes" |
146 |
local theme |
local theme |
147 |
local i |
local i |
148 |
|
|
157 |
fi |
fi |
158 |
;; |
;; |
159 |
system) |
system) |
160 |
list_files_in_directory -type d -mindepth 1 -maxdepth 1 ${MROOT}/etc/splash/themes |
list_files_in_directory -type d -mindepth 1 -maxdepth 1 ${themedir} |
161 |
;; |
;; |
162 |
*) |
*) |
163 |
help_boot_theme |
help_boot_theme |
179 |
helper_set_boot_theme_plymouth() |
helper_set_boot_theme_plymouth() |
180 |
{ |
{ |
181 |
local theme="$1" |
local theme="$1" |
182 |
local themedir="/usr/share/plymouth/themes" |
local themedir="${MROOT}/usr/share/plymouth/themes" |
183 |
[[ -z ${theme} ]] && help_boot_theme && return 1 |
[[ -z ${theme} ]] && help_boot_theme && return 1 |
184 |
|
|
185 |
if [[ -d ${themedir}/${theme} ]] |
if [[ -d ${themedir}/${theme} ]] |
194 |
helper_set_boot_theme_fbsplash() |
helper_set_boot_theme_fbsplash() |
195 |
{ |
{ |
196 |
local theme="$1" |
local theme="$1" |
197 |
local themedir="/etc/splash/themes" |
local themedir="${MROOT}/etc/splash/themes" |
198 |
[[ -z ${theme} ]] && help_boot_theme && return 1 |
[[ -z ${theme} ]] && help_boot_theme && return 1 |
199 |
|
|
200 |
if [[ -d ${themedir}/${theme} ]] |
if [[ -d ${themedir}/${theme} ]] |