From dff9ac99c5989c212ed882d6fb2d8a717538a0fd Mon Sep 17 00:00:00 2001 From: Romain Dessort <romain@univers-libre.net> Date: Thu, 28 Sep 2017 13:58:53 -0400 Subject: [PATCH] Close #11273. Exclude partitions from device list Use lsblk instead of sfdisk to get a list of block devices on the host. --- handlers/sys.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handlers/sys.in b/handlers/sys.in index 1d47977..d545719 100644 --- a/handlers/sys.in +++ b/handlers/sys.in @@ -107,6 +107,7 @@ getconf sysreportfile $parentdir/sysreport.txt getconf SFDISK `which sfdisk` getconf HWINFO `which hwinfo` +getconf LSBLK `which lsblk` getconf sfdisk_options "" getconf hwinfo_options "" @@ -607,7 +608,7 @@ fi if [ "$partitions" == "yes" ]; then if [ "$dosfdisk" == "yes" ]; then - devices=`LC_ALL=C $SFDISK -l 2>/dev/null | grep "^Disk /dev" | @AWK@ '{print $2}' | cut -d: -f1` + devices=`LC_ALL=C $LSBLK --output NAME,TYPE --list --paths 2>/dev/null | grep "disk$" | @AWK@ '{print $1}'` if [ "$devices" == "" ]; then warning "No harddisks found" fi -- GitLab