mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
tweaked grep to make sure it's ^rootfs
This commit is contained in:
parent
e7fd174440
commit
f6abbdf3c8
4
inxi
4
inxi
|
@ -4939,7 +4939,7 @@ get_partition_data()
|
|||
# added devfs linprocfs sysfs fdescfs which show on debian kfreebsd kernel output
|
||||
local main_partition_data="$( df -h -T -P --exclude-type=aufs --exclude-type=squashfs --exclude-type=unionfs --exclude-type=devtmpfs --exclude-type=tmpfs --exclude-type=iso9660 --exclude-type=devfs --exclude-type=linprocfs --exclude-type=sysfs --exclude-type=fdescfs )"
|
||||
local swap_data="$( swapon -s )"
|
||||
# set dev disk label/uuid data globals
|
||||
# set dev disk label/uuid data globalss
|
||||
get_partition_uuid_label_data 'label'
|
||||
get_partition_uuid_label_data 'uuid'
|
||||
|
||||
|
@ -4949,7 +4949,7 @@ get_partition_data()
|
|||
# so check for two string endings of / then slice out the rootfs one, I could check for it
|
||||
# before slicing it out, but doing that would require the same action twice re code execution
|
||||
if [[ $( grep -cs '[[:space:]]/$' <<< "$main_partition_data" ) -gt 1 ]];then
|
||||
main_partition_data="$( grep -vs 'rootfs' <<< "$main_partition_data" )"
|
||||
main_partition_data="$( grep -vs '^rootfs' <<< "$main_partition_data" )"
|
||||
fi
|
||||
log_function_data 'post-rootfs-filter' "main_partition_data:\n$main_partition_data\n\nswap_data:\n$swap_data"
|
||||
IFS=$'\n'
|
||||
|
|
Loading…
Reference in a new issue