X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Flsb-functions;h=2aa0c777773c02b32389e159bcdfacf802668b7e;hb=4c17f24271add7f6aeb4bb27ef5c8033432eb55a;hp=bac8cfd0a0e090471455cd5c1a6fafc082557f1e;hpb=31c8bc260482b8fe0870c6033c69cdf79987baf2;p=grml-etc-core.git diff --git a/etc/grml/lsb-functions b/etc/grml/lsb-functions index bac8cfd..2aa0c77 100644 --- a/etc/grml/lsb-functions +++ b/etc/grml/lsb-functions @@ -182,12 +182,11 @@ esyslog() { local pri local tag + [ "$#" -le 2 ] && return 0 if [ -x /usr/bin/logger ] ; then pri="$1" tag="$2" - shift 2 - [ "$#" -eq 0 ] && return 0 /usr/bin/logger -p "${pri}" -t "${tag}" -- "$@" fi @@ -200,7 +199,7 @@ esyslog() { # increase the indent used for e-commands. # eindent() { - local i="$1" + local i="${1:-0}" [ "$i" -gt 0 ] || i="${RC_DEFAULT_INDENT}" esetdent $(( ${#RC_INDENTATION} + $i )) } @@ -210,7 +209,7 @@ eindent() { # decrease the indent used for e-commands. # eoutdent() { - local i="$1" + local i="${1:-0}" [ "$i" -gt 0 ] || i="${RC_DEFAULT_INDENT}" esetdent $(( ${#RC_INDENTATION} - $i )) } @@ -221,7 +220,7 @@ eoutdent() { # num defaults to 0 # esetdent() { - local i="$1" + local i="${1:-0}" [ "$i" -lt 0 ] && i=0 RC_INDENTATION="$(printf "%${i}s" '')" } @@ -338,7 +337,7 @@ _eend() { printf "${ENDCOL} ${msg}\n" else [ "${LAST_E_CMD}" = "ebegin" ] || LAST_E_LEN=0 - printf "%$(( ${COLS} - "${LAST_E_LEN}" - 6 ))s%b\n" '' "${msg}" + printf "%$(( ${COLS} - ${LAST_E_LEN} - 6 ))s%b\n" '' "${msg}" fi return "${retval}"