mirror of
https://github.com/tteck/Proxmox.git
synced 2024-12-24 14:01:56 +00:00
Update edge-kernel.sh
tweak
This commit is contained in:
parent
7b23807535
commit
3f84544b09
@ -1,13 +1,24 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/edge-kernel.sh)"
|
# bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/edge-kernel.sh)"
|
||||||
|
function header_info {
|
||||||
|
cat <<"EOF"
|
||||||
|
____ _ ________ ______ __ __ __ __
|
||||||
|
/ __ \ | / / ____/ / ____/___/ /___ ____ / //_/__ _________ ___ / /____
|
||||||
|
/ /_/ / | / / __/ / __/ / __ / __ `/ _ \ / ,< / _ \/ ___/ __ \/ _ \/ / ___/
|
||||||
|
/ ____/| |/ / /___ / /___/ /_/ / /_/ / __/ / /| / __/ / / / / / __/ (__ )
|
||||||
|
/_/ |___/_____/ /_____/\__,_/\__, /\___/ /_/ |_\___/_/ /_/ /_/\___/_/____/
|
||||||
|
/____/
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
set -e
|
set -e
|
||||||
KERNEL_ON=$(uname -r)
|
KERNEL_ON=$(uname -r)
|
||||||
PVE_KERNEL=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print substr($2, 12, length($2)-1) }' | tac | head -n 1)
|
PVE_KERNEL=$(dpkg --list | grep 'kernel-.*-pve' | awk '{print substr($2, 12, length($2)-1) }' | tac | head -n 1)
|
||||||
EDGE_KERNEL=$(dpkg --list | grep 'kernel-.*-edge' | awk '{print substr($2, 12, length($2)-1) }' | tac | head -n 1)
|
EDGE_KERNEL=$(dpkg --list | grep 'kernel-.*-edge' | awk '{print substr($2, 12, length($2)-1) }' | tac | head -n 1)
|
||||||
VER=$(curl -s https://api.github.com/repos/fabianishere/pve-edge-kernel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-9) }')
|
VER=$(curl -s https://api.github.com/repos/fabianishere/pve-edge-kernel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-9) }')
|
||||||
KER=$(curl -s https://api.github.com/repos/fabianishere/pve-edge-kernel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-6) }')
|
KER=$(curl -s https://api.github.com/repos/fabianishere/pve-edge-kernel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-6) }')
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
header_info
|
||||||
while true; do
|
while true; do
|
||||||
read -p "This is a Proxmox Edge Kernel Tool, USE AT YOUR OWN RISK. Proceed(y/n)?" yn
|
read -p "This is a Proxmox Edge Kernel Tool, USE AT YOUR OWN RISK. Proceed(y/n)?" yn
|
||||||
case $yn in
|
case $yn in
|
||||||
@ -17,16 +28,7 @@ while true; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
clear
|
clear
|
||||||
function header_info {
|
header_info
|
||||||
cat <<"EOF"
|
|
||||||
____ _ ________ ______ __ __ __ __
|
|
||||||
/ __ \ | / / ____/ / ____/___/ /___ ____ / //_/__ _________ ___ / /____
|
|
||||||
/ /_/ / | / / __/ / __/ / __ / __ `/ _ \ / ,< / _ \/ ___/ __ \/ _ \/ / ___/
|
|
||||||
/ ____/| |/ / /___ / /___/ /_/ / /_/ / __/ / /| / __/ / / / / / __/ (__ )
|
|
||||||
/_/ |___/_____/ /_____/\__,_/\__, /\___/ /_/ |_\___/_/ /_/ /_/\___/_/____/
|
|
||||||
/____/
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
show_menu() {
|
show_menu() {
|
||||||
normal=$(echo "\033[m")
|
normal=$(echo "\033[m")
|
||||||
safe=$(echo "\033[32m")
|
safe=$(echo "\033[32m")
|
||||||
|
Loading…
Reference in New Issue
Block a user