You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
703 B

#!/usr/bin/env bash
synopsis() {
cat << EOF
Usage : `basename $0` [-h] [les options de vdn-start]
EOF
}
help() {
cat << EOF
`basename $0` ne fait qu'appeler vdn-start et analyser son
code de retour.
`synopsis`
-h : affiche cette aide
EOF
}
usage() {
synopsis
exit 1
}
# Programme principal
[ "$1" = '-h' ] && { help; exit 0; }
vdn-start "$@"
r=$?
[ -z "$VDN_DEBUG" ] && VDN_DEBUG=0 || :
# 1 : when linux killed
# 143 : when kvm is killed
set -x
#if [ $VDN_DEBUG = 1 -o \( $r != 1 -a $r != 143 -a $r != 0 \) ]; then
if [ $VDN_DEBUG = 1 -o \( $r != 143 -a $r != 0 \) ]; then
echo
echo "DEBUG MODE (ret=$r) : Press Return to exit"
read < /dev/tty
#else
# read < /dev/tty
fi