Skip to content
Snippets Groups Projects
Commit 1b1a857c authored by Jérôme Charaoui's avatar Jérôme Charaoui
Browse files

Make sfdisk grep for luks headers more specific

parent 012dc70f
No related branches found
No related tags found
No related merge requests found
......@@ -633,7 +633,7 @@ if [ "$partitions" == "yes" ]; then
fi
if [ "$luksheaders" == "yes" ]; then
devices=`LC_ALL=C $SFDISK -l 2>/dev/null | grep '/dev/' | @SED@ -e 's/Disk //' -re 's/:? +.*//g'`
devices=`LC_ALL=C $SFDISK -l 2>/dev/null | grep -E '^(Disk )?/dev/' | @SED@ -e 's/Disk //' -re 's/:? +.*//g'`
[ -n "$devices" ] || warning "No block device found"
partitions=`LC_ALL=C $SFDISK -l 2>/dev/null |grep "^/dev" | @AWK@ '{print $1}'`
[ -n "$partitions" ] || warning "No partitions found"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment