1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-31 05:47:43 +03:00

tests: secure rm call

Use "${var:?}" to ensure this never expands to / .
(Should never happen as 'dir' was supposed to exist from preceding
test.)
This commit is contained in:
Zdenek Kabelac 2017-07-07 11:50:33 +02:00
parent 4ed3f1bee3
commit 2e47ab9b8c

View File

@ -62,7 +62,7 @@ vgremove -ff $vg
if test -d "$DM_DEV_DIR/$vg" ; then
should not echo "Udev has left \"$DM_DEV_DIR/$vg\"!"
rm -rf "$DM_DEV_DIR/$vg"
rm -rf "${DM_DEV_DIR:?/dev}/$vg"
fi
# The profile must be also applied if using the profile