bitkeeper revision 1.1159.122.1 (4177c41conAxvsSnGCUYzYBlBVfqCQ)

Fix init.d/xendomains.
This commit is contained in:
cl349@freefall.cl.cam.ac.uk committed 2004-10-21 14:13:48 +00:00
1 parent 7c7bed5754
commit 5c18f70977
3 files changed
+17 -6

No files matched your search

+2
View File
@@ -1,6 +1,7 @@
# Init scripts.
XEND_INITD = init.d/xend
XENDOMAINS_INITD = init.d/xendomains
# Xen configuration dir and configs to go there.
XEN_CONFIG_DIR = /etc/xen
@@ -22,6 +23,7 @@ install: all install-initd install-configs install-scripts
install-initd:
install -d $(prefix)/etc/init.d
install -m0755 $(XEND_INITD) $(prefix)/etc/init.d
install -m0755 $(XENDOMAINS_INITD) $(prefix)/etc/init.d
install-configs:
install -d $(prefix)$(XEN_CONFIG_DIR)
+12 -4
View File
@@ -17,7 +17,7 @@
RETVAL=0
INITD=/etc/init.d/
INITD=/etc/init.d
AUTODIR=/etc/xen/auto
LOCKFILE=/var/lock/subsys/xendomains
@@ -36,7 +36,7 @@ if [ -e /lib/lsb ]; then
log_failure_msg
fi
}
else
elif [ -r $INITD/functions ]; then
# assume a Redhat-like distro
. $INITD/functions # source Redhat functions
@@ -48,6 +48,14 @@ else
failure
fi
echo
}
else
# none of the above
LOCKFILE=/var/lock/xendomains
on_fn_exit()
{
echo
}
fi
@@ -66,7 +74,7 @@ start() {
# Create all domains with config files in AUTODIR.
for dom in $AUTODIR/*; do
xm create --quiet --defaults $dom
xm create --quiet --defconfig $dom
if [ $? -ne 0 ]; then
RETVAL=$?
fi
@@ -86,7 +94,7 @@ stop()
echo -n $"Shutting down all Xen domains:"
xm shutdown --all --wait --norestart
xm shutdown --all --wait --halt
RETVAL=$?
+3 -2
View File
@@ -46,7 +46,7 @@ def shutdown(opts, doms, mode, wait):
server.xend_domain_shutdown(d, mode)
if wait:
while doms:
alive = domains()
alive = server.xend_domains()
dead = []
for d in doms:
if d in alive: continue
@@ -73,7 +73,8 @@ def shutdown_mode(opts):
return mode
def main_all(opts, args):
shutdown(opts, None, opts.vals.wait)
mode = shutdown_mode(opts)
shutdown(opts, None, mode, opts.vals.wait)
def main_dom(opts, args):
if len(args) < 1: opts.err('Missing domain')
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.