Bastian Blank
2011-Oct-26 22:26 UTC
[Pkg-xen-changes] r927 - trunk/xen-common/debian/scripts
Author: waldi Date: Wed Oct 26 22:26:36 2011 New Revision: 927 Log: debian/scripts/xen-utils-wrapper: Simplify. Modified: trunk/xen-common/debian/scripts/xen-utils-wrapper (contents, props changed) Modified: trunk/xen-common/debian/scripts/xen-utils-wrapper =============================================================================--- trunk/xen-common/debian/scripts/xen-utils-wrapper Wed Oct 26 22:25:59 2011 (r926) +++ trunk/xen-common/debian/scripts/xen-utils-wrapper Wed Oct 26 22:26:36 2011 (r927) @@ -1,22 +1,6 @@ -#!/bin/sh - -set -e +#!/bin/sh -e COMMAND="$(basename $0)" -VERSION=$(/usr/lib/xen-common/bin/xen-version -v) - -if [ -z "$VERSION" ]; then - VERSION="default" -fi - -if [ -d "/usr/lib/xen-$VERSION" ]; then - DIR="/usr/lib/xen-$VERSION" -elif [ -d "/usr/lib/xen-default" ]; then - echo "WARING! Can''t find version $VERSION of xen utils, fallback to default version!" >&2 - DIR="/usr/lib/xen-default" -else - echo "ERROR! Can''t find default version of xen utils, bailing out!" >&2 - exit 127 -fi +DIR=$(/usr/lib/xen-common/bin/xen-dir) exec "$DIR/bin/$COMMAND" "$@"