All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Knorr <kraxel@suse.de>
To: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: Re: stable / unstable parallel install?
Date: Wed, 1 Jun 2005 10:56:44 +0200	[thread overview]
Message-ID: <20050601085644.GA3409@bytesex> (raw)
In-Reply-To: <A95E2296287EAD4EB592B5DEEFCE0E9D281FD3@liverpoolst.ad.cl.cam.ac.uk>

  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

  parent reply	other threads:[~2005-06-01  8:56 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-01  7:46 stable / unstable parallel install? Ian Pratt
2005-06-01  8:20 ` aq
2005-06-01  8:56 ` Gerd Knorr [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-06-09  1:09 Ian Pratt
2005-06-01  9:19 Ian Pratt
2005-06-01  9:59 ` Gerd Knorr
2005-06-04 14:57 ` aq
2005-06-09  1:28   ` Rusty Russell
2005-05-31 11:09 Ian Pratt
2005-05-30 13:22 Gerd Knorr
2005-05-30 13:26 ` Steven Hand
2005-05-30 13:35   ` Gerd Knorr
2005-05-31  2:52   ` Jacob Gorm Hansen
2005-05-30 13:34 ` Keir Fraser
2005-05-30 15:50   ` Gerd Knorr
2005-05-30 16:00     ` aq
2005-05-30 16:15       ` Keir Fraser
2005-06-01  7:35         ` aq
2005-05-30 16:03   ` aq
2005-05-30 16:17     ` Keir Fraser
2005-05-30 17:22     ` Gerd Knorr
2005-05-30 18:38       ` aq
2005-05-31  1:50       ` aq
2005-05-31  9:54         ` Gerd Knorr
2005-06-01  6:03           ` aq

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050601085644.GA3409@bytesex \
    --to=kraxel@suse.de \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.