mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-06 08:10:25 +03:00
ZTS: Use swapctl to list swap devices on FreeBSD
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #11503
This commit is contained in:
parent
3e33897bec
commit
bfb7b9613a
@ -35,6 +35,8 @@
|
|||||||
#
|
#
|
||||||
if is_linux; then
|
if is_linux; then
|
||||||
SAVESWAPDEVS=$(swapon -s | nawk '(NR != 1) {print $1}')
|
SAVESWAPDEVS=$(swapon -s | nawk '(NR != 1) {print $1}')
|
||||||
|
elif is_freebsd; then
|
||||||
|
SAVESWAPDEVS=$(swapctl -l | nawk '(NR != 1) {print $1}')
|
||||||
else
|
else
|
||||||
SAVESWAPDEVS=$(swap -l | nawk '(NR != 1) {print $1}')
|
SAVESWAPDEVS=$(swap -l | nawk '(NR != 1) {print $1}')
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user