diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2019-08-06 17:11:39 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2019-08-06 22:40:31 +0200 |
commit | 5124ba044c454c112e756c5e8024650a64008609 (patch) | |
tree | 0133f97a17c0d960b1c4906889673bc19ed42ebd /defaults/unlock-luks.sh | |
parent | initrd.defaults: Remove duplicated definition of $NORMAL (diff) | |
download | genkernel-5124ba044c454c112e756c5e8024650a64008609.tar.gz genkernel-5124ba044c454c112e756c5e8024650a64008609.tar.bz2 genkernel-5124ba044c454c112e756c5e8024650a64008609.zip |
linuxrc: Rework debug mode
This commit will introduce $GK_DEBUGMODE_STATEFILE and a new
function is_debug() to check if debug mode is enabled or not.
Using a state file instead of a variable will allow us to
enable/disable debug mode from outside:
I.e. when you have booted in debug mode and are working remotely,
you can now remove the state file, which will disable debug mode.
This will allow you to resume booting without dropping in
another local debug shell.
It works the other way, too: When you did NOT boot in debug
mode but experiencing a problem and want to drop in another
debug shell after next step, you can now enable debug mode by
creating the state file.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'defaults/unlock-luks.sh')
-rw-r--r-- | defaults/unlock-luks.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/defaults/unlock-luks.sh b/defaults/unlock-luks.sh index cae52696..e8f28f63 100644 --- a/defaults/unlock-luks.sh +++ b/defaults/unlock-luks.sh @@ -106,7 +106,7 @@ main() { if [ -s "${LUKS_KEY}" ] then - if [ "${DEBUG}" != 'yes' ] + if ! is_debug then rm -f "${LUKS_KEY}" else |