env_init, grub list & split
This commit is contained in:
parent
86d12fe01f
commit
99ae54c84c
11 changed files with 112 additions and 52 deletions
66
grub.cfg.sh
66
grub.cfg.sh
|
@ -34,10 +34,19 @@ function grub_init {
|
|||
}
|
||||
|
||||
function grub_list_const {
|
||||
echo -n "\
|
||||
cpu-platform | ${grub_cpu}-${grub_platform}
|
||||
cmdpath | ${cmdpath}
|
||||
"
|
||||
target="${1}"
|
||||
setparams \
|
||||
" cpu-platform | ${grub_cpu}-${grub_platform}" \
|
||||
" cmdpath | ${cmdpath}"
|
||||
for entry in "${@}" ; do
|
||||
if [ "${target}" == 'menu' ] ; then
|
||||
menuentry "${entry}" { nop }
|
||||
else
|
||||
echo "${entry}"
|
||||
fi
|
||||
done
|
||||
unset entry
|
||||
unset target
|
||||
}
|
||||
|
||||
function grub_list_info {
|
||||
|
@ -57,20 +66,38 @@ function grub_list_info {
|
|||
}
|
||||
|
||||
function grub_list_vars {
|
||||
echo -n "\
|
||||
root | ${root}
|
||||
prefix | ${prefix}
|
||||
check_signatures | ${check_signatures}
|
||||
"
|
||||
target="${1}"
|
||||
setparams \
|
||||
" root | ${root}" \
|
||||
" prefix | ${prefix}" \
|
||||
"check_signatures | ${check_signatures}"
|
||||
for entry in "${@}" ; do
|
||||
if [ "${target}" == 'menu' ] ; then
|
||||
menuentry "${entry}" { nop }
|
||||
else
|
||||
echo "${entry}"
|
||||
fi
|
||||
done
|
||||
unset entry
|
||||
unset target
|
||||
list_trusted
|
||||
}
|
||||
|
||||
function grub_list_xtra {
|
||||
echo -n "\
|
||||
env | ${env}
|
||||
live | ${live}
|
||||
data | ${data}
|
||||
"
|
||||
target="${1}"
|
||||
setparams \
|
||||
" env | ${env}" \
|
||||
" live | ${live}" \
|
||||
" data | ${data}"
|
||||
for entry in "${@}" ; do
|
||||
if [ "${target}" == 'menu' ] ; then
|
||||
menuentry "${entry}" { nop }
|
||||
else
|
||||
echo "${entry}"
|
||||
fi
|
||||
done
|
||||
unset entry
|
||||
unset target
|
||||
}
|
||||
|
||||
function grub_main {
|
||||
|
@ -107,9 +134,14 @@ function grub_pause {
|
|||
}
|
||||
|
||||
function grub_split {
|
||||
echo -n "\
|
||||
---
|
||||
"
|
||||
target="${1}"
|
||||
setparams \
|
||||
' ---'
|
||||
if [ "${target}" == 'menu' ] ; then
|
||||
menuentry "${1}" { nop }
|
||||
else
|
||||
echo "${1}"
|
||||
fi
|
||||
}
|
||||
|
||||
grub_main
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue