Skip to content
Snippets Groups Projects
Commit b15e5f6b authored by intrigeri's avatar intrigeri
Browse files

Merge branch 'master' into 'master'

#11273: Exclude partitions from device list

Closes #11273

See merge request riseuplabs/backupninja!7
parents 757aa873 dff9ac99
Branches
Tags
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment