Include adaption of @MrChromebox

See
5a3f599233
This commit is contained in:
alex-nitrokey 2020-06-25 09:58:01 +02:00
parent c07f3b7f7c
commit 481082f2d8
No known key found for this signature in database
GPG Key ID: A8853020E8EE6FBA
2 changed files with 9 additions and 3 deletions

View File

@ -218,6 +218,7 @@ while true; do
'y' ' Default boot' \ 'y' ' Default boot' \
'r' ' Refresh TOTP/HOTP' \ 'r' ' Refresh TOTP/HOTP' \
'a' ' Options -->' \ 'a' ' Options -->' \
'S' ' System Info' \
'P' ' Power Off' \ 'P' ' Power Off' \
2>/tmp/whiptail || recovery "GUI menu failed" 2>/tmp/whiptail || recovery "GUI menu failed"
@ -233,7 +234,6 @@ while true; do
'c' ' Change configuration settings -->' \ 'c' ' Change configuration settings -->' \
'f' ' Flash/Update the BIOS -->' \ 'f' ' Flash/Update the BIOS -->' \
'G' ' GPG Options -->' \ 'G' ' GPG Options -->' \
'S' ' Systeminfo' \
'F' ' OEM Factory Reset -->' \ 'F' ' OEM Factory Reset -->' \
'x' ' Exit to recovery shell' \ 'x' ' Exit to recovery shell' \
'r' ' <-- Return to main menu' \ 'r' ' <-- Return to main menu' \
@ -376,8 +376,11 @@ while true; do
fi fi
if [ "$totp_confirm" = "S" ]; then if [ "$totp_confirm" = "S" ]; then
whiptail --title 'Systeminfo' \ memtotal=$(cat /proc/meminfo | grep 'MemTotal' | tr -s ' ' | cut -f2 -d ' ')
--msgbox "$(cat /proc/meminfo | grep 'MemTotal' | sed 's/MemTotal:/Mem:/')\n\n$(cat /proc/cpuinfo | grep 'model name' | uniq | sed 's/model name.*:/CPU:/')\n\n$(fdisk -l | grep '/dev/sd.:' | sed 's/B,.*/B/')" 16 60 memtotal=$((${memtotal} / 1024 / 1024 + 1))
cpustr=$(cat /proc/cpuinfo | grep 'model name' | uniq | sed -r 's/\(R\)//;s/\(TM\)//;s/CPU //;s/model name.*: //')
whiptail --title 'System Info' \
--msgbox "VER: ${FW_VER}\n\nCPU: ${cpustr}\nRAM: ${memtotal} MB\n\n$(fdisk -l | grep -e '/dev/sd.:' -e '/dev/nvme.*:' | sed 's/B,.*/B/')" 16 60
continue continue
fi fi

View File

@ -92,6 +92,9 @@ fi
combine_configs combine_configs
. /tmp/config . /tmp/config
# export firmware version
export FW_VER=$(dmesg | grep 'DMI' | grep -o 'BIOS.*' | cut -f2 -d ' ')
# Add our boot devices into the /etc/fstab, if they are defined # Add our boot devices into the /etc/fstab, if they are defined
# in the configuration file. # in the configuration file.
if [ ! -z "$CONFIG_BOOT_DEV" ]; then if [ ! -z "$CONFIG_BOOT_DEV" ]; then