Skip to content

Commit 0949b0e

Browse files
committed
Updated version. New features.
1 parent 7d97707 commit 0949b0e

File tree

1 file changed

+19
-27
lines changed

1 file changed

+19
-27
lines changed

system-info

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,7 @@ function GetBtrfs()
12681268
cut -b 7- | \
12691269
sed 's/^/\/dev\//g' )
12701270

1271-
debug "bt_lsblk: $bt_lsblk"
1271+
# echo "Debug -- bt_lsblk: $bt_lsblk"
12721272

12731273
if [ -z "$bt_lsblk" ]
12741274
then
@@ -1294,46 +1294,38 @@ function GetBtrfsInfo()
12941294

12951295
# Get for BTRFS volume names
12961296
btdev_vols=$(mount | \
1297-
grep -v 'snap' | \
1297+
grep -v 'snap\' | \
12981298
grep 'btrfs' | \
12991299
awk '{print $3}' )
13001300

13011301
for vol in ${btdev_vols}
13021302
do
1303-
if [ "$vol" == *"snap"* ]
1304-
then
1305-
continue
1306-
else
1307-
echo "Properties of BTRFS Volume: $vol"
1308-
sudo btrfs property get $vol
1309-
nl
1310-
fi
1303+
echo "Properties of BTRFS Volume: $vol"
1304+
sudo btrfs property get $vol
1305+
nl
13111306
done
13121307

1313-
debug "Debug -- btdev_vols :"
1314-
debug "$btdev_vols" # DEBUG
1308+
# echo "Debug -- btdev_vols :"
1309+
# echo "$btdev_vols" # DEBUG
13151310

13161311
for vol in ${btdev_vols[@]}
13171312
do
13181313
# echo "Debug -- vol: $vol"
13191314

1320-
if [ "$var" == *"snap"* ]
1321-
then
1322-
continue
1323-
else
1324-
SubVolName=$(sudo btrfs subvol list $vol | \
1325-
awk '{print $9} ' )
1315+
FsName=$()
1316+
1317+
SubVolName=$(sudo btrfs subvol list $vol | \
1318+
awk '{print $9} ' )
13261319

1327-
debug "Debug -- SubVolName: $SubVolName"
1320+
# echo "Debug -- SubVolName: $SubVolName"
13281321

1329-
if [ -z "$SubVolName" ]
1330-
then
1331-
echo -e "BTRFS filesystem present on $vol, but no BTRFS SubVolumes there."
1332-
nl
1333-
else
1334-
sudo btrfs subvol show -h $vol
1335-
nl
1336-
fi
1322+
if [ -z "$SubVolName" ]
1323+
then
1324+
echo -e "BTRFS filesystem present on $vol, but no BTRFS SubVolumes there."
1325+
nl
1326+
else
1327+
sudo btrfs subvol show -h $vol
1328+
nl
13371329
fi
13381330
done
13391331
fi

0 commit comments

Comments
 (0)