fix inadequate chroot_archives validation

commit d74f2102a0 added a validation check
to chroot_archives for its 'pass' parameter. this was based upon finding
an instance where the wrong value was being submitted to the script and
wanting to ensure such mistakes would be caught.

unfortunately it seems that I made a mistake in misremembering the facts
surrounding the latter issue when constructing the validation check and
failed to double check with testing until it was already merged. a
correction is needed. the set of valid values is not limited to only
'source|binary' but actually 'source|binary|chroot'. I'd misremembered
'chroot' as being a completely invalid value.
This commit is contained in:
Lyndon Brown 2020-03-06 00:53:44 +00:00 committed by Raphaël Hertzog
parent 7624527d77
commit 37f0432e98
1 changed files with 3 additions and 2 deletions

View File

@ -16,12 +16,13 @@ set -e
# Setting static variables
DESCRIPTION="Manage /etc/apt/sources.list"
HELP=""
USAGE="${PROGRAM} {source|binary} {install|remove} [--force]"
USAGE="${PROGRAM} {source|binary|chroot} {install|remove} [--force]"
_PASS="${1}"
shift
if [ "${_PASS}" != "binary" ] && [ "${_PASS}" != "source" ]; then
if [ "${_PASS}" != "binary" ] && [ "${_PASS}" != "chroot" ] && [ "${_PASS}" != "source" ]
then
Usage
fi