File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,11 @@ get_kernel_names() {
6767
6868# get current kernel
6969get_current_kernel_name () {
70- current_kernel_name=$( find " $kernelctl_dir " -samefile " $kernelctl_dir " /current.tar.bz2 ! -name current.tar.bz2 -print0 | xargs -0 -I" {}" basename {} .tar.bz2)
70+ if [[ -e " $kernelctl_dir " /current.tar.bz2 ]]; then
71+ current_kernel_name=$( find " $kernelctl_dir " -samefile " $kernelctl_dir " /current.tar.bz2 ! -name current.tar.bz2 -print0 | xargs -0 -I" {}" basename {} .tar.bz2)
72+ else
73+ current_kernel_name=' '
74+ fi
7175}
7276
7377# translate input into a kernel name
@@ -104,8 +108,12 @@ list() {
104108# show the current configured kernel
105109show () {
106110 get_current_kernel_name
107- echo -e " ${gr} Current kernel:${sf} "
108- echo -e " ${bf}${current_kernel_name}${sf} "
111+ if [[ " $current_kernel_name " = " " ]]; then
112+ echo -e " ${bf} There is no link to the current running kernel in the staging area.${sf} "
113+ else
114+ echo -e " ${gr} Current kernel:${sf} "
115+ echo -e " ${bf}${current_kernel_name}${sf} "
116+ fi
109117}
110118
111119# actually switch kernels
Original file line number Diff line number Diff line change 55pkgnames=(kernelctl)
66pkgdesc=" Manage aftermarket kernels"
77url=https://toltec-dev.org/
8- pkgver=0.1-4
9- timestamp=2022-03-14T00 :00Z
8+ pkgver=0.1-5
9+ timestamp=2022-11-12T00 :00Z
1010section=" utils"
1111maintainer=" Salvatore Stella <etn45p4m@gmail.com>"
1212license=MIT
@@ -27,14 +27,7 @@ package() {
2727
2828configure () {
2929 if [[ " $( kernelctl list | tail -n +2 | awk ' {print $2}' | grep " vanilla-$( < /etc/version) " ) " == " " ]]; then
30- read -r -d ' ' msg << - EOM
31- It looks like there is no backup of the upstream kernel for the
32- installed version of codex.
33-
34- Please standby while one is produced (assuming that the
35- currently running kernel is upstream).
36- EOM
37- echo -e " $msg "
30+ echo " Creating a backup of the currently running kernel."
3831 kernelctl backup vanilla
3932 fi
4033}
You can’t perform that action at this time.
0 commit comments