WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] stable / unstable parallel install?

To: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] stable / unstable parallel install?
From: Gerd Knorr <kraxel@xxxxxxx>
Date: Wed, 1 Jun 2005 10:56:44 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 01 Jun 2005 08:59:27 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <A95E2296287EAD4EB592B5DEEFCE0E9D281FD3@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <A95E2296287EAD4EB592B5DEEFCE0E9D281FD3@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
  Hi,

> xcs should not be on the path. Christian pointed out that such helper
> applications should probably live in /usr/libexec/xen

$(prefix)/libexec/xen ;)

I think it would be a very good idea to have the install prefix
configurable (extra bonus for an environment variable to
overwrite this at runtime ;).

I can go through the tools build system and try to fix that
everythere.  Probably it's needed anyway, I havn't managed yet
to make the 3.x tools work in a non-standard location.  xend
comes up, xm list & xm dmesg works as well, but booting domU's
doesn't work.  Tested with unpatched xen & xenlinux & tools of
course, so this shouldn't be a hypercall interface issue.
With 2.x it works fine.  Start script is attached below for
reference.

BTW: IIRC libexec is deprecated these days, I think
arch-specific stuff just goes to lib (including binaries) and
non-arch stuff to share.

  Gerd

==============================[ cut here ]==============================
#! /bin/sh

### BEGIN INIT INFO
# Provides:          xen
# Required-Start:    $syslog $network
# Required-Stop:     $syslog $network
# Default-Start:     3 5
# Default-Stop:      0 1 2 6
# Short-Description: xen daemon
# Description:       xen daemon
### END INIT INFO

# init script stuff
. /etc/rc.status
rc_reset

# config
xen2="/work/bk/xen/xen-2/dist/install"
xen3="/work/bk/xen/xen-3/dist/install"

# figure where we are running
function xen_detect() {
        local xenprefix

        if test -f /proc/xen/grant; then
                echo "Xen 3.0 unstable found"
                xenprefix="$xen3"
        elif test -d /proc/xen; then
                echo "Xen 2.0.x found"
                xenprefix="$xen2"
        else
                echo "running unXen-ified on the bare metal"
                rm -f /etc/profile.d/xen.sh
                exit 0
        fi

        # update config
        cat <<-EOF > /etc/profile.d/xen.sh
                PATH="$xenprefix/usr/sbin:$xenprefix/usr/bin:\$PATH"
                LD_LIBRARY_PATH="$xenprefix/usr/lib"
                PYTHONPATH="$xenprefix/usr/lib/python"
                export PATH LD_LIBRARY_PATH PYTHONPATH
EOF
        chmod 755 /etc/profile.d/xen.sh
}

case "$1" in
    start)
        xen_detect
        source /etc/profile.d/xen.sh
        xcs="$(which xcs 2>/dev/null)"
        xend="$(which xend 2>/dev/null)"

        if test -x "$xcs"; then
                echo -n "  starting xcs "
                startproc $xcs
                rc_status -v
        fi
        if test -x "$xend"; then
                echo -n "  starting xend "
                $xend start
                rc_status -v
        fi
        ;;
    stop)
        xen_detect
        source /etc/profile.d/xen.sh
        xcs="$(which xcs 2>/dev/null)"
        xend="$(which xend 2>/dev/null)"

        if test -x "$xend"; then
                echo -n "  shutting down xend "
                $xend stop
                rc_status -v
        fi
        if test -x "$xcs"; then
                echo -n "  shutting down xcs "
                killall -TERM $xcs
                rc_status -v
        fi
        ;;
    restart)
        $0 stop
        $0 start
        rc_status
        ;;
    *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
esac
rc_exit


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel