add IP address to Recovery information

Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
Michel-FK 2021-01-12 11:53:38 +01:00
parent c1fd9e55d6
commit 32dd326342
1 changed files with 5 additions and 4 deletions

View File

@ -16,8 +16,8 @@ menu_display () {
case ${entry} in
0)
# Version
message=" VERSION"
# Information
message=" INFO"
;;
1)
@ -90,7 +90,7 @@ menu_run () {
case ${entry} in
0)
# Version
# Information
rootfs_mount=/tmp/rootfs
mkdir -p ${rootfs_mount}
mount -t ext4 -o ro /dev/mmcblk0p2 ${rootfs_mount}
@ -101,7 +101,8 @@ menu_run () {
fi
umount ${rootfs_mount}
version_recovery=$(grep Recovery /etc/sw-versions | cut -f 2)
notif "${message}^^ Recovery: ${version_recovery}^ rootfs : ${version_rootfs}"
ip_addr=$(ifconfig usb0 | grep "inet " | awk -F'[: ]+' '{ print $4 }')
notif "${message}^^ Recovery: ${version_recovery}^ rootfs : ${version_rootfs}^ IP addr : ${ip_addr}"
;;
1)