diff options
author | Wynn Wolf Arbor | 2020-05-16 11:33:17 +0200 |
---|---|---|
committer | Wynn Wolf Arbor | 2020-05-16 11:33:17 +0200 |
commit | b5fe3282d2d44d858990639cb7d13aae53e07170 (patch) | |
tree | 822e7325fbf086a9c98b7306ea2f7f66ac044383 | |
parent | e25e7ad50bb82b416e2c703356867a8be7cb9d09 (diff) | |
download | kern-b5fe3282d2d44d858990639cb7d13aae53e07170.tar.gz |
Don't exit if newest kernel is selected
It was really never a good idea to make this a fatal error, especially
considering consecutive calls of kern(1) without any arguments will fail
after the kernel has been set successfully once.
Diffstat (limited to '')
-rwxr-xr-x | kern | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -5,8 +5,12 @@ set -e SRCDIR=/usr/src KERNFRAG=${KERNFRAG:-/etc/kernfrag} -errx() { +err() { printf "kern: %s\n" "$@" >&2 +} + +errx() { + err "$@" exit 1 } @@ -36,7 +40,8 @@ set_kernel() { fi if test "$kern" = "$current"; then - errx "Latest kernel already selected: $kern" + err "Warning: Latest kernel already selected: $kern" + return fi printf "Selecting kernel: %s\n" "$kern" |