diff options
author | Wynn Wolf Arbor | 2020-06-04 14:13:53 +0200 |
---|---|---|
committer | Wynn Wolf Arbor | 2020-06-04 14:13:53 +0200 |
commit | 1a7eb1654bac6d3ac92fcf251444dc80dea16204 (patch) | |
tree | e898bd35b6178ed8e5e487ce5736437e8f3f1f4d | |
parent | 988bc7061938720152169cadaa6ed2bd9af6270b (diff) | |
download | kern-1a7eb1654bac6d3ac92fcf251444dc80dea16204.tar.gz |
Rename get_current_kernel to get_selected_kernel
In a similar vein to commit 5f83bed ("Use consistent and explicit
terminology in set_kernel()"), the term "current" kernel is ambiguous
here. An upcoming commit will introduce the concept of the "running
config", which is the kernel configuration the currently running kernel
uses. To reduce any ambiguity, use "selected" instead of "current".
-rwxr-xr-x | kern | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -26,18 +26,18 @@ get_latest_kernel() { eselect --brief kernel list | tail -n1 } -get_current_kernel() { +get_selected_kernel() { basename "$(eselect --brief kernel show 2>/dev/null)" } set_kernel() { kern=${1:-$(get_latest_kernel)} - current=$(get_current_kernel) + selected=$(get_selected_kernel) kerndir=$SRCDIR/$kern test -d "$kerndir" || errx "No such file or directory: $kerndir" - if test "$kern" = "$current"; then + if test "$kern" = "$selected"; then err "Warning: Latest kernel already selected: $kern" return fi |