dist/common/scripts/scylla_setup: use 'swapon -s' instead of 'swapon --show'

Since Ubuntu 14.04 doesn't supported --show option, we need to prevent use it.
Fixes #1740

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1475788340-22939-2-git-send-email-syuu@scylladb.com>
(cherry picked from commit 469e9af1f4)
This commit is contained in:
Takuya ASADA
2016-10-07 06:12:20 +09:00
committed by Avi Kivity
parent af26e7a691
commit f4bb52096b

View File

@@ -84,7 +84,7 @@ get_unused_disks() {
if [ -f /usr/sbin/pvs ]; then
count_pvs=$(pvs|grep $dev|wc -l)
fi
count_swap=$(swapon --show |grep `realpath $dev`|wc -l)
count_swap=$(swapon -s |grep `realpath $dev`|wc -l)
if [ $count_raw -eq 0 -a $count_pvs -eq 0 -a $count_swap -eq 0 ]; then
echo -n "$dev "
fi