X-Git-Url: http://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=usr_bin%2Fgrml-exec-wrapper;h=81592460dd9e5e934db505e290a8438a15b46880;hb=78cd3bc89d1e9e7a670b2eb529d1791f6b43f551;hp=cd51cae50d5135bc1987de93fa70c0f2c4f09703;hpb=d03a386825bd12fb95cf4b87572038102a7ee514;p=grml-scripts-core.git diff --git a/usr_bin/grml-exec-wrapper b/usr_bin/grml-exec-wrapper index cd51cae..8159246 100755 --- a/usr_bin/grml-exec-wrapper +++ b/usr_bin/grml-exec-wrapper @@ -28,7 +28,7 @@ display_info() { if is_installed Xdialog && test -n "$DISPLAY" ; then Xdialog --title "grml-exec-wrapper" --msgbox "$1" 0 0 0 else - print "$1">&2 + printf '%s\n' "$1">&2 fi } @@ -37,19 +37,18 @@ if [ -z "$1" ] ; then exit 1 fi -RC='0' PROG="$1" # make sure to support 'grml-exec-wrapper sudo wireshark' as well: case $PROG in - *sudo*) PROG="$2" ;; + *sudo*) PROG="$2" ;; esac if is_installed "$PROG" ; then exec "$@" -else - RC=1 - display_info "Sorry: ${PROG} not available. +fi + +display_info "Sorry: ${PROG} not available. Looks like the grml flavour you are using does not ship ${PROG}. :( @@ -57,8 +56,7 @@ You can search for ${PROG} executing: apt-get update && apt-cache search ${PROG} " -fi -exit $RC +exit 1 ## END OF FILE #################################################################