mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
fsadm: fix unbound variable usage
When 'fsadm resize vg/lv' is used without size, it should just resize filesystem to match device - but since we now check for unbound variable in bash - the previous usage no longer works and needs explicit check.
This commit is contained in:
parent
7691213a91
commit
47608ff49b
@ -798,6 +798,7 @@ fi
|
||||
|
||||
CHECK=""
|
||||
RESIZE=""
|
||||
NEWSIZE=""
|
||||
|
||||
while [ "$#" -ne 0 ]
|
||||
do
|
||||
@ -811,8 +812,11 @@ do
|
||||
"-y"|"--yes") YES="-y" ;;
|
||||
"-l"|"--lvresize") DO_LVRESIZE=1 ;;
|
||||
"-c"|"--cryptresize") DO_CRYPTRESIZE=1 ;;
|
||||
"check") CHECK=$2 ; shift ;;
|
||||
"resize") RESIZE=$2 ; NEWSIZE=$3 ; shift 2 ;;
|
||||
"check") test -z "${2-}" && error "Missing <device>. (see: $TOOL --help)"
|
||||
CHECK=$2 ; shift ;;
|
||||
"resize") test -z "${2-}" && error "Missing <device>. (see: $TOOL --help)"
|
||||
RESIZE=$2 ; shift
|
||||
if test -n "${2-}" ; then NEWSIZE="${2-}" ; shift ; fi ;;
|
||||
*) error "Wrong argument \"$1\". (see: $TOOL --help)"
|
||||
esac
|
||||
shift
|
||||
|
Loading…
Reference in New Issue
Block a user