env,pause
This commit is contained in:
parent
2ab2f2032e
commit
738c2095d2
13 changed files with 52 additions and 41 deletions
|
@ -1,16 +1,26 @@
|
|||
function env {
|
||||
action="${1}"
|
||||
action="${1}"
|
||||
setparams \
|
||||
'check_squashfs' 'grub_sleep' 'time_out' 'to_ram'
|
||||
'check_squashfs' \
|
||||
'live_from' \
|
||||
'pause' \
|
||||
'time_out'
|
||||
if [ "${action}" == 'load' ] ; then
|
||||
load_env \
|
||||
--file "${env}" \
|
||||
--skip-sig \
|
||||
--file "${env}" "${@}"
|
||||
"${@}"
|
||||
fi
|
||||
if [ "${action}" == 'save' ] ; then
|
||||
save_env \
|
||||
--file "${env}" "${@}"
|
||||
--file "${env}" \
|
||||
"${@}"
|
||||
fi
|
||||
if [ "${action}" == 'set' ] ; then
|
||||
load_env \
|
||||
"${@}"
|
||||
fi
|
||||
unset action
|
||||
}
|
||||
|
||||
function env_apply {
|
||||
|
@ -21,10 +31,18 @@ function env_apply {
|
|||
fi
|
||||
}
|
||||
|
||||
function env_default {
|
||||
if [ "${1}" == 'check_squashfs' ] ; then default="_${check_squashfs}" ; fi
|
||||
if [ "${1}" == 'live_from' ] ; then default="_${live_from}" ; fi
|
||||
if [ "${1}" == 'pause' ] ; then default="_${pause}" ; fi
|
||||
if [ "${1}" == 'time_out' ] ; then default="_${time_out}" ; fi
|
||||
}
|
||||
|
||||
function env_init {
|
||||
grub_init
|
||||
env_set
|
||||
env set
|
||||
env_mod
|
||||
env load
|
||||
env_apply
|
||||
}
|
||||
|
||||
|
@ -46,10 +64,3 @@ function env_mod {
|
|||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function env_set {
|
||||
check_squashfs='enforce'
|
||||
grub_sleep=999
|
||||
time_out=10
|
||||
to_ram='enforce'
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue