6 |
get_boot_splash() |
get_boot_splash() |
7 |
{ |
{ |
8 |
local var |
local var |
9 |
var=$(grep "^export GRUB_CMDLINE_BOOTSPLASH=" ${MROOT}/etc/conf.d/grub | sed "s:.*splash=\(.*\),.*:\1:") |
var=$(grep "^export GRUB_CMDLINE_BOOTSPLASH=" ${MROOT}@@CONFDDIR@@/grub | sed "s:.*splash=\(.*\),.*:\1:") |
10 |
|
|
11 |
case "${var}" in |
case "${var}" in |
12 |
silent|"") mecho "bootsplash currently enabled"; rvecho "1" ;; |
silent|"") mecho "bootsplash currently enabled"; rvecho "1" ;; |
22 |
|
|
23 |
case "${action}" in |
case "${action}" in |
24 |
enable) |
enable) |
25 |
sed -i "s:^\(export GRUB_CMDLINE_BOOTSPLASH=\).*:\1\"splash=silent,theme=default\":" ${MROOT}/etc/conf.d/grub |
sed -i "s:^\(export GRUB_CMDLINE_BOOTSPLASH=\).*:\1\"splash=silent,theme=default\":" ${MROOT}@@CONFDDIR@@/grub |
26 |
helper_boot_rebuild_bootconfig |
helper_boot_rebuild_bootconfig |
27 |
mecho "bootsplash enabled" |
mecho "bootsplash enabled" |
28 |
;; |
;; |
29 |
disable) |
disable) |
30 |
sed -i "s:^\(export GRUB_CMDLINE_BOOTSPLASH=\).*:\1\"splash=verbose,theme=default\":" ${MROOT}/etc/conf.d/grub |
sed -i "s:^\(export GRUB_CMDLINE_BOOTSPLASH=\).*:\1\"splash=verbose,theme=default\":" ${MROOT}@@CONFDDIR@@/grub |
31 |
helper_boot_rebuild_bootconfig |
helper_boot_rebuild_bootconfig |
32 |
mecho "bootsplash disabled" |
mecho "bootsplash disabled" |
33 |
;; |
;; |
38 |
get_boot_theme() |
get_boot_theme() |
39 |
{ |
{ |
40 |
local action="$1" |
local action="$1" |
41 |
local themedir="${MROOT}/etc/splash/themes" |
local themedir="${MROOT}@@SYSCONFDIR@@/splash/themes" |
42 |
local theme |
local theme |
43 |
local i |
local i |
44 |
|
|
65 |
set_boot_theme() |
set_boot_theme() |
66 |
{ |
{ |
67 |
local theme="$1" |
local theme="$1" |
68 |
local themedir="${MROOT}/etc/splash/themes" |
local themedir="${MROOT}@@SYSCONFDIR@@/splash/themes" |
69 |
[[ -z ${theme} ]] && help_boot_theme && return 1 |
[[ -z ${theme} ]] && help_boot_theme && return 1 |
70 |
|
|
71 |
if [[ -d ${themedir}/${theme} ]] |
if [[ -d ${themedir}/${theme} ]] |