Fix init.d/xendomains.
# 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
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)
RETVAL=0
-INITD=/etc/init.d/
+INITD=/etc/init.d
AUTODIR=/etc/xen/auto
LOCKFILE=/var/lock/subsys/xendomains
log_failure_msg
fi
}
-else
+elif [ -r $INITD/functions ]; then
# assume a Redhat-like distro
. $INITD/functions # source Redhat functions
failure
fi
+ echo
+ }
+else
+ # none of the above
+ LOCKFILE=/var/lock/xendomains
+
+ on_fn_exit()
+ {
echo
}
fi
# 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
echo -n $"Shutting down all Xen domains:"
- xm shutdown --all --wait --norestart
+ xm shutdown --all --wait --halt
RETVAL=$?
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
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')