diff options
Diffstat (limited to 'pbuilder-checkparams')
-rwxr-xr-x | pbuilder-checkparams | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pbuilder-checkparams b/pbuilder-checkparams index 51aafab..74666ca 100755 --- a/pbuilder-checkparams +++ b/pbuilder-checkparams @@ -132,6 +132,10 @@ while [ -n "$1" ]; do REMOVEPACKAGES="$2"; shift; shift; ;; + --loglevel) + LOGLEVEL="$2" + shift; shift; + ;; --configfile) if [ ! -f "$2" ]; then log.e "Config file $2 does not exist" @@ -295,6 +299,16 @@ if [ -z "${CHROOTEXEC}" ]; then CHROOTEXEC="chroot $BUILDPLACE " fi +# sanity check of LOGLEVEL +case "$LOGLEVEL" in + D|I|W|E) ;; + *) # use log() instead of log.e() to override the buggy LOGLEVEL + log "E: A non-valid LOGLEVEL has been specified: '${LOGLEVEL}'." + log "E: Valid values are D, I, W, E" + exit 1 + ;; +esac + # handle 'experimental' specially. -- required for raw pbuilder (create/update) only. if [ "$DISTRIBUTION" = "experimental" ]; then DISTRIBUTION="sid" |