Cosmetics: - no need to escape the newline after '|'
- parenthesize the "case" string for symmetry and improved search for matching paren (e.g. with vi's %)
This commit is contained in:
parent
2ada524ece
commit
9b3940931d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298537
@ -19,10 +19,10 @@ required_modules="zfs"
|
|||||||
zvol_start()
|
zvol_start()
|
||||||
{
|
{
|
||||||
# Enable swap on ZVOLs with property org.freebsd:swap=on.
|
# Enable swap on ZVOLs with property org.freebsd:swap=on.
|
||||||
zfs list -H -o org.freebsd:swap,name -t volume | \
|
zfs list -H -o org.freebsd:swap,name -t volume |
|
||||||
while read state name; do
|
while read state name; do
|
||||||
case "${state}" in
|
case "${state}" in
|
||||||
[oO][nN])
|
([oO][nN])
|
||||||
swapon /dev/zvol/${name}
|
swapon /dev/zvol/${name}
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -32,10 +32,10 @@ zvol_start()
|
|||||||
zvol_stop()
|
zvol_stop()
|
||||||
{
|
{
|
||||||
# Disable swap on ZVOLs with property org.freebsd:swap=on.
|
# Disable swap on ZVOLs with property org.freebsd:swap=on.
|
||||||
zfs list -H -o org.freebsd:swap,name -t volume | \
|
zfs list -H -o org.freebsd:swap,name -t volume |
|
||||||
while read state name; do
|
while read state name; do
|
||||||
case "${state}" in
|
case "${state}" in
|
||||||
[oO][nN])
|
([oO][nN])
|
||||||
swapoff /dev/zvol/${name}
|
swapoff /dev/zvol/${name}
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user