mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
(change version)
Added in support for unmounted lvm type syntax in unmounted partitions function, /dev/dm-1, I forgot about that possibiliity. Fixed/patched hfs detection based on a file -s sample data chunk. Added hfsj, which I assume is hfs+, who knows for sure.
This commit is contained in:
parent
658921da9a
commit
61c3cd7ced
9
inxi
9
inxi
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.3.1
|
#### version: 1.3.2
|
||||||
#### Date: January 9 2010
|
#### Date: January 14 2010
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -3575,7 +3575,8 @@ get_unmounted_partition_data()
|
||||||
IGNORECASE=1
|
IGNORECASE=1
|
||||||
}
|
}
|
||||||
# note that size 1 means it is a logical extended partition container
|
# note that size 1 means it is a logical extended partition container
|
||||||
/[a-z][0-9]+$/ && $3 != 1 {
|
# lvm might have dm-1 type syntax
|
||||||
|
/[a-z][0-9]+$|dm-[0-9]+$/ && $3 != 1 {
|
||||||
size = sprintf( "%.2f", $3*1024/1000**3 )
|
size = sprintf( "%.2f", $3*1024/1000**3 )
|
||||||
print $4 "," size "G"
|
print $4 "," size "G"
|
||||||
}' ) )
|
}' ) )
|
||||||
|
@ -3621,7 +3622,7 @@ get_unmounted_partition_filesystem()
|
||||||
fi
|
fi
|
||||||
# this will fail if regular user and no sudo present, but that's fine, it will just return null
|
# this will fail if regular user and no sudo present, but that's fine, it will just return null
|
||||||
# note the hack that simply slices out the first line if > 1 items found in string
|
# note the hack that simply slices out the first line if > 1 items found in string
|
||||||
partition_filesystem=$( eval $sudo_command file -s $1 | grep -Eio '(ext2|ext3|ext4|ext5|ext[[:space:]]|ntfs|fat32|fat16|fat[[:space:]]\(.*\)|vfat|fatx|tfat|swap|btrfs|ffs[[:space:]]|hfs\+|hfs[[:space:]]plus|hfs[[:space:]]|jfs[[:space:]]|nss[[:space:]]|reiserfs|reiser4|ufs2|ufs[[:space:]]|xfs[[:space:]]|zfs[[:space:]])' | grep -Em 1 '.*' )
|
partition_filesystem=$( eval $sudo_command file -s $1 | grep -Eio '(ext2|ext3|ext4|ext5|ext[[:space:]]|ntfs|fat32|fat16|fat[[:space:]]\(.*\)|vfat|fatx|tfat|swap|btrfs|ffs[[:space:]]|hfs\+|hfs[[:space:]]plus|hfs[[:space:]]extended[[:space:]]version[[:space:]][1-9]|hfsj|hfs[[:space:]]|jfs[[:space:]]|nss[[:space:]]|reiserfs|reiser4|ufs2|ufs[[:space:]]|xfs[[:space:]]|zfs[[:space:]])' | grep -Em 1 '.*' )
|
||||||
if [[ -n $partition_filesystem ]];then
|
if [[ -n $partition_filesystem ]];then
|
||||||
echo $partition_filesystem
|
echo $partition_filesystem
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue