mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
[rt46602] Clean up getopts usage
Ensure case clauses are in sync with the string passed to getopts. Remove catch-all clauses as they will never be evaluated.
This commit is contained in:
parent
fe51c34df3
commit
0dcee1cad3
@ -24,7 +24,6 @@ runall=0
|
||||
while getopts "r" flag; do
|
||||
case $flag in
|
||||
r) runall=1 ;;
|
||||
*) exit 1;;
|
||||
esac
|
||||
done
|
||||
shift `expr $OPTIND - 1`
|
||||
|
@ -17,13 +17,12 @@ stopservers=true
|
||||
clean=true
|
||||
baseport=5300
|
||||
|
||||
while getopts "rnp:d:" flag; do
|
||||
while getopts "knp:r" flag; do
|
||||
case "$flag" in
|
||||
k) stopservers=false ;;
|
||||
n) clean=false ;;
|
||||
p) baseport=$OPTARG ;;
|
||||
r) runall="-r" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
done
|
||||
shift `expr $OPTIND - 1`
|
||||
|
@ -25,7 +25,6 @@ usage="Usage: ./runall.sh [-n] [numprocesses]"
|
||||
while getopts "n" flag; do
|
||||
case "$flag" in
|
||||
n) CLEANFLAG="NOCLEAN=-n" ;;
|
||||
*) echo "$usage" >&2 ; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
shift `expr $OPTIND - 1`
|
||||
|
@ -29,7 +29,6 @@ keepfile=0
|
||||
while getopts "n" flag; do
|
||||
case $flag in
|
||||
n) keepfile=1 ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user