summaryrefslogtreecommitdiff
path: root/lib/blkid/test_probe.in
diff options
context:
space:
mode:
Diffstat (limited to 'lib/blkid/test_probe.in')
-rw-r--r--lib/blkid/test_probe.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/blkid/test_probe.in b/lib/blkid/test_probe.in
index 9b3edf52..a7b29a2e 100644
--- a/lib/blkid/test_probe.in
+++ b/lib/blkid/test_probe.in
@@ -21,11 +21,11 @@ do
echo "non-existent"
continue
fi
- if [ "$i" = "swap0" ]; then
+ if [ "$i" = "swap0" ] && which mkswap > /dev/null; then
# swap is native-endian, so regenerate before testing
dd if=/dev/zero of=$IMAGE bs=16k count=64 2> /dev/null
mkswap -v0 $IMAGE > /dev/null
- elif [ "$i" = "swap1" ]; then
+ elif [ "$i" = "swap1" ] && which mkswap > /dev/null; then
# swap is native-endian, so regenerate before testing
dd if=/dev/zero of=$IMAGE bs=16k count=64 2> /dev/null
# check if mkswap supports the "-U" option