[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



  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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.