Skip to content

Commit d047e99

Browse files
committed
Added Kernel version output option to dietpi-banner
1 parent b6bf907 commit d047e99

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dietpi/func/dietpi-banner

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,15 @@
6464
'RAM usage'
6565
'Load average'
6666
'Word-wrap lines on small screens'
67+
'Kernel'
6768
)
6869

6970
# Set defaults: Disable CPU temp by default in VMs
7071
if (( $G_HW_MODEL == 20 ))
7172
then
72-
aENABLED=(1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0 0 0)
73+
aENABLED=(1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0 0 0 0)
7374
else
74-
aENABLED=(1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0)
75+
aENABLED=(1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0)
7576
fi
7677

7778
COLOUR_RESET='\e[0m'
@@ -262,6 +263,8 @@ $GREEN_LINE"
262263
(( ${aENABLED[0]} )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[0]} $GREEN_SEPARATOR $G_HW_MODEL_NAME"
263264
# Uptime
264265
(( ${aENABLED[1]} )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[1]} $GREEN_SEPARATOR $(uptime -p 2>&1)"
266+
# Linux kernel version
267+
(( ${aENABLED[20]} )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[20]} $GREEN_SEPARATOR $(uname -r 2>&1)"
265268
# CPU temp
266269
(( ${aENABLED[2]} )) && echo -e "$GREEN_BULLET ${aCOLOUR[1]}${aDESCRIPTION[2]} $GREEN_SEPARATOR $(print_full_info=1 G_OBTAIN_CPU_TEMP 2>&1)"
267270
# RAM usage

0 commit comments

Comments
 (0)