Bastian Blank
2006-Sep-09 10:44 UTC
[Pkg-xen-changes] r308 - in trunk/xen-common: debian scripts
Author: waldi Date: Sat Sep 9 10:44:41 2006 New Revision: 308 Added: trunk/xen-common/scripts/xen-utils-version - copied, changed from r307, /trunk/xen-common/scripts/xen-utils-root Removed: trunk/xen-common/scripts/xen-utils-root Modified: trunk/xen-common/debian/xen-utils-common.xend.init trunk/xen-common/scripts/Makefile trunk/xen-common/scripts/xen-utils-wrapper Log: * debian/xen-utils-common.xend.init: Use xen-utils-version. * scripts/Makefile: Update. * scripts/xen-utils-version - Move from scripts/xen-utils-root. - Return version. * scripts/xen-utils-wrapper: Use xen-utils-version. Modified: trunk/xen-common/debian/xen-utils-common.xend.init =============================================================================--- trunk/xen-common/debian/xen-utils-common.xend.init (original) +++ trunk/xen-common/debian/xen-utils-common.xend.init Sat Sep 9 10:44:41 2006 @@ -6,10 +6,11 @@ NAME=xend DESC=XEN XENSTORED_RUN_DIR="/var/run/xenstored" -ROOT=$(xen-utils-root -q || true) +VERSION=$(xen-utils-version -q || true) +ROOT=/usr/lib/xen-$VERSION DAEMON=$ROOT/bin/xend -test "$ROOT" || exit 0 +test "$VERSION" || exit 0 test -x $DAEMON || exit 0 test -e /proc/xen/privcmd || exit 0 grep -q "control_d" /proc/xen/capabilities || exit 0 Modified: trunk/xen-common/scripts/Makefile =============================================================================--- trunk/xen-common/scripts/Makefile (original) +++ trunk/xen-common/scripts/Makefile Sat Sep 9 10:44:41 2006 @@ -19,7 +19,7 @@ xm PRIVATE_SCRIPTS = \ - xen-utils-root \ + xen-utils-version \ $(WRAPPER) WRAPPER = xen-utils-wrapper Copied: trunk/xen-common/scripts/xen-utils-version (from r307, /trunk/xen-common/scripts/xen-utils-root) =============================================================================--- /trunk/xen-common/scripts/xen-utils-root (original) +++ trunk/xen-common/scripts/xen-utils-version Sat Sep 9 10:44:41 2006 @@ -28,16 +28,14 @@ VERSION="default" fi -root="/usr/lib/xen-$VERSION" -if [ -d "$root" ]; then - echo "$root" +if [ -d "/usr/lib/xen-$VERSION" ]; then + echo "$VERSION" exit 0 fi -root="/usr/lib/xen-default" -if [ -d "$root" ]; then +if [ -d "/usr/lib/xen-default" ]; then [ "$QUIET" ] || echo "WARING! Can''t find version $VERSION of xen utils, fallback to default version!" >&2 - echo "$root" + echo "default" exit 0 fi Modified: trunk/xen-common/scripts/xen-utils-wrapper =============================================================================--- trunk/xen-common/scripts/xen-utils-wrapper (original) +++ trunk/xen-common/scripts/xen-utils-wrapper Sat Sep 9 10:44:41 2006 @@ -1,5 +1,7 @@ #!/bin/bash +libdir=/usr/lib command="$(basename $0)" -root=$(/usr/lib/xen-common/bin/xen-utils-root -v "$XEN_VERSION") -[ "$root" ] && exec "$root/bin/$command" "$@" +version=$($libdir/xen-common/bin/xen-utils-version -v "$XEN_VERSION") +[ "$version" ] && exec "$libdir/xen-$version/bin/$command" "$@" +exit 127