tree: some fixes

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-07-02 19:49:09 +02:00
parent 4bbbebd3c9
commit 9f3928ecfd
2 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ ntpCheck
# Mounts backtitle dynamically
function backtitle() {
if [ -n "${NEWTAG}" ] && [ "${NEWTAG}" != "${ARC_VERSION}" ] && [ "${OFFLINE}" == "false" ]; then
ARC_TITLE="${ARC_TITLE} -> ${NEWTAG}"
ARC_TITLE="${ARC_TITLE} > ${NEWTAG}"
fi
if [ -z "${MODEL}" ]; then
MODEL="(Model)"

View File

@ -250,14 +250,14 @@ function _sort_netif() {
# 1 - device path
function getBus() {
BUS=""
# xen
[ -z "${BUS}" ] && BUS=$(lsblk -dpno KNAME,SUBSYSTEMS 2>/dev/null | grep "${1} " | grep -q "xen" && echo "xen")
# usb/ata(sata/ide)/scsi
[ -z "${BUS}" ] && BUS=$(udevadm info --query property --name "${1}" 2>/dev/null | grep ID_BUS | cut -d= -f2 | sed 's/ata/sata/')
# usb/sata(sata/ide)/nvme
[ -z "${BUS}" ] && BUS=$(lsblk -dpno KNAME,TRAN 2>/dev/null | grep "${1} " | awk '{print $2}') #Spaces are intentional
# usb/scsi(sata/ide)/virtio(scsi/virtio)/mmc/nvme
[ -z "${BUS}" ] && BUS=$(lsblk -dpno KNAME,SUBSYSTEMS 2>/dev/null | grep "${1} " | awk '{print $2}' | awk -F':' '{print $(NF-1)}' | sed 's/_host//') # Spaces are intentional
# xen
[ -z "${BUS}" ] && BUS=$(lsblk -dpno KNAME,SUBSYSTEMS 2>/dev/null | grep "${1} " | grep -q "xen" && echo "xen")
echo "${BUS}"
return 0
}