Merge pull request #113 from PeterMosmans/showversion

FIX: Show version when specified on command line
This commit is contained in:
Dirk Wetter 2015-05-30 11:16:31 +02:00
commit 353b58c0c0
1 changed files with 4 additions and 1 deletions

View File

@ -3076,6 +3076,7 @@ mybanner() {
hn=$(hostname) hn=$(hostname)
#poor man's ident (nowadays ident not neccessarily installed) #poor man's ident (nowadays ident not neccessarily installed)
idtag=$(grep -a '\$Id' $0 | grep -aw "[E]xp" | sed -e 's/^# //' -e 's/\$ $/\$/') idtag=$(grep -a '\$Id' $0 | grep -aw "[E]xp" | sed -e 's/^# //' -e 's/\$ $/\$/')
which git &>/dev/null && idtag="$(git log --format='%h %s (%ci)' -1 2>/dev/null)"
[ "$COLOR" -ne 0 ] && idtag="\033[1;30m$idtag\033[m\033[1m" [ "$COLOR" -ne 0 ] && idtag="\033[1;30m$idtag\033[m\033[1m"
bb=$(cat <<EOF bb=$(cat <<EOF
@ -3540,7 +3541,9 @@ startup() {
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
case $1 in case $1 in
-b|--banner|-v|--version) -b|--banner|-v|--version)
exit 0;; find_openssl_binary
mybanner
exit 0;;
--mx) --mx)
do_mx_allentries=true;; do_mx_allentries=true;;
--mx465) # doesn't work with major ISPs --mx465) # doesn't work with major ISPs