From 61c3cd7cedf95f9a6bcc4ed91bfe63796c197a33 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Thu, 14 Jan 2010 20:46:59 +0000 Subject: [PATCH] (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. --- inxi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/inxi b/inxi index 5733536..b41b9e5 100755 --- a/inxi +++ b/inxi @@ -1,8 +1,8 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.3.1 -#### Date: January 9 2010 +#### version: 1.3.2 +#### Date: January 14 2010 ######################################################################## #### SPECIAL THANKS ######################################################################## @@ -3575,7 +3575,8 @@ get_unmounted_partition_data() IGNORECASE=1 } # 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 ) print $4 "," size "G" }' ) ) @@ -3621,7 +3622,7 @@ get_unmounted_partition_filesystem() fi # 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 - 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 echo $partition_filesystem fi