torizon / meta-toradex-torizon

Torizon OS OpenEmbedded Distro Layer
MIT License
6 stars 10 forks source link

neofetch: add info func for container engine #20

Closed MingliuYan closed 5 months ago

MingliuYan commented 5 months ago

Add a info function to print out container engine and its version by checking /etc/os-release for VARIANT.

Also fix a invalid shell information in OE, sh is a symbolic link to bash.bash instead of bash in OE, handle that case by checking BASH_VERSION, provided that's present, treat sh as bash.

before the change, neofetch output:

OS: TorizonCore 6.6.0-devel-20240219121314+build.0 (kirkstone) aarch64
Kernel: 5.15.124-6.6.0-devel+git.f0e7afd5948f
Uptime: 1 min
Shell: sh
Resolution: 1024x768
Terminal: /dev/pts/0
CPU: (4)
Memory: 90MiB / 1989MiB

after the change, neofetch output:

OS: TorizonCore 6.6.0-devel-20240219121314+build.0 (kirkstone) aarch64
Kernel: 5.15.124-6.6.0-devel+git.f0e7afd5948f
Container Engine: Podman 4.8.2
Uptime: 1 min
Shell: bash 5.1.16
Resolution: 1024x768
Terminal: /dev/pts/0
CPU: (4)
Memory: 90MiB / 1989MiB

Fix: https://github.com/torizon/meta-toradex-torizon/issues/19