aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWynn Wolf Arbor2020-06-04 14:27:09 +0200
committerWynn Wolf Arbor2020-06-04 14:27:09 +0200
commit6afb134571d36cd5ab6a05a9bf80a18632ff2581 (patch)
tree05088e426899be36976dd45b8facd8da6601b44c
parent1a7eb1654bac6d3ac92fcf251444dc80dea16204 (diff)
downloadkern-6afb134571d36cd5ab6a05a9bf80a18632ff2581.tar.gz
Use readlink(1) to get the currently selected kernel
get_selected_kernel uses eselect(1) to retrieve the currently selected kernel. Since the eselect tool itself does nothing other than invoke readlink(1) on /usr/src/linux, use that instead.
-rwxr-xr-xkern2
1 files changed, 1 insertions, 1 deletions
diff --git a/kern b/kern
index 9c49ef7..4809a2c 100755
--- a/kern
+++ b/kern
@@ -27,7 +27,7 @@ get_latest_kernel() {
}
get_selected_kernel() {
- basename "$(eselect --brief kernel show 2>/dev/null)"
+ readlink "$SRCDIR/linux"
}
set_kernel() {