mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-24 01:49:54 +07:00
tree: some fixes
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
4bbbebd3c9
commit
9f3928ecfd
@ -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)"
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user