diff --git a/NodeQuality.sh b/NodeQuality.sh index 92d14e1..f46e20d 100644 --- a/NodeQuality.sh +++ b/NodeQuality.sh @@ -103,6 +103,7 @@ function clear_mount(){ umount $work_dir/BenchOs/proc/ 2> /dev/null umount $work_dir/BenchOs/sys/ 2> /dev/null umount -R $work_dir/BenchOs/dev/ 2> /dev/null + umount "$work_dir/BenchOs/hostinfo/os-release" 2> /dev/null } function load_bench_os(){ @@ -120,6 +121,10 @@ function load_bench_os(){ rm etc/resolv.conf 2>/dev/null cp /etc/resolv.conf etc/resolv.conf + + mkdir hostinfo + touch hostinfo/os-release + mount --bind /etc/os-release hostinfo/os-release } function chroot_run(){ diff --git a/part/yabs.sh b/part/yabs.sh index 9261e64..b921680 100644 --- a/part/yabs.sh +++ b/part/yabs.sh @@ -262,7 +262,7 @@ RAM_PLUS_SWAP="$(( TOTAL_RAM_RAW + TOTAL_SWAP_RAW ))" TOTAL_DISK_RAW=$(lsblk -d -n -o SIZE --bytes | awk '{sum+=$1} END {printf "%.0f\n", sum}' | numfmt --to-unit=1024) TOTAL_DISK=$(format_size "$TOTAL_DISK_RAW") echo -e "Disk : $TOTAL_DISK" -DISTRO=$(grep 'PRETTY_NAME' /etc/os-release | cut -d '"' -f 2 ) +DISTRO=$(grep 'PRETTY_NAME' hostinfo/os-release | cut -d '"' -f 2 ) echo -e "Distro : $DISTRO" KERNEL=$(uname -r) echo -e "Kernel : $KERNEL"