mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +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
|
# 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 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 )"
|
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 'label'
|
||||||
get_partition_uuid_label_data 'uuid'
|
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
|
# 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
|
# 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
|
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
|
fi
|
||||||
log_function_data 'post-rootfs-filter' "main_partition_data:\n$main_partition_data\n\nswap_data:\n$swap_data"
|
log_function_data 'post-rootfs-filter' "main_partition_data:\n$main_partition_data\n\nswap_data:\n$swap_data"
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
|
|
Loading…
Reference in a new issue