diff options
author | <bruce.edge@gmail.com> | 2010-09-20 17:54:25 +0100 |
---|---|---|
committer | <bruce.edge@gmail.com> | 2010-09-20 17:54:25 +0100 |
commit | 744d6961f91581f603c0f285f52c4b23fa30ad4c (patch) | |
tree | aa4234e9410ff44dc0abbea0d5f2e4b1b6ce66cc /tools/xenballoon | |
parent | 1e7aadfdffeee8f6f62c7f06a34966d62d2c297f (diff) | |
download | xen-744d6961f91581f603c0f285f52c4b23fa30ad4c.tar.gz xen-744d6961f91581f603c0f285f52c4b23fa30ad4c.tar.bz2 xen-744d6961f91581f603c0f285f52c4b23fa30ad4c.zip |
tools, build system: Make changing distro-specific layout aspects easier
Introduce CONFIG_LEAF_DIR, SUBSYS_DIR, INITD_DIR variables to cope
better with variation between distributions.
See docs/misc/distro_mapping.txt for details.
Signed-off-by: Bruce Edge <bruce.edge@gmail.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/xenballoon')
-rw-r--r-- | tools/xenballoon/xenballoond | 9 | ||||
-rw-r--r-- | tools/xenballoon/xenballoond.README | 15 | ||||
-rw-r--r-- | tools/xenballoon/xenballoond.init | 2 |
3 files changed, 18 insertions, 8 deletions
diff --git a/tools/xenballoon/xenballoond b/tools/xenballoon/xenballoond index d8f43461de..121aa3e490 100644 --- a/tools/xenballoon/xenballoond +++ b/tools/xenballoon/xenballoond @@ -21,7 +21,7 @@ # If xenbus is running and the /usr/bin/xenstore-* tools are installed, # "xenbus is enabled". # -# Parameters are documented in /etc/sysconfig/xenballoon.conf. Although +# Parameters are documented in <SYSCONFIG>/xenballoon.conf. Although # some are not used with directed ballooning, all must be set properly. # If xenbus is enabled, some of these parameters may be overridden by values # set by domain0 via xenbus. @@ -237,7 +237,12 @@ else fi preswapnow=0 -. /etc/sysconfig/xenballoon.conf +# See docs/misc/distro_mapping.txt +if [ -f /etc/sysconfig/xenballoon.conf ]; then + . /etc/sysconfig/xenballoon.conf +elif [ -f /etc/default/xenballoon.conf ]; then + . /etc/default/xenballoon.conf +fi while true; do diff --git a/tools/xenballoon/xenballoond.README b/tools/xenballoon/xenballoond.README index a65ac42cf7..9084898648 100644 --- a/tools/xenballoon/xenballoond.README +++ b/tools/xenballoon/xenballoond.README @@ -56,16 +56,20 @@ Guest prerequisites to use xenballoond: be installed. Binaries can be obtained, for example, by building xen-vvv.gz/tools in a guest-binary-compatible development tree -Instructions to install/deploy xenballoond (in Redhat-based system): +Instructions to install/deploy xenballoond: + (see docs/misc/distro_mapping.txt for SYSCONFIG and INITD_DIR definitions) - in each guest: - ensure pre-requisites are met (see above) - - place xenballoon.conf in /etc/sysconfig + - place xenballoon.conf in <SYSCONFIG> - place xenballoond in /usr/sbin - - copy xenballoond.init to /etc/rc.d/init.d/xenballoond (note file rename) - - edit /etc/sysconfig/xenballoond.conf as desired (especially note that + - copy xenballoond.init to <INITD_DIR>/xenballoond (note file rename) + - edit <SYSCONFIG>/xenballoond.conf as desired (especially note that selfballooning defaults as off) - start xenballoond with "service xenballoond start", and/or configure - xenballoond to start at init (e.g. "chkconfig xenballoond on") + xenballoond to start at init + (Red Hat e.g. "chkconfig xenballoond on") + (Debian e.g. " update-rc.d xenballoond defaults") + (Suse e.g. " insserv xenballoond") - in domain0: - if monitoring is desired, xenballoon-monitor may be installed in /usr/sbin - note that certain xenballoond.conf variables may be overridden by domain0 @@ -73,7 +77,6 @@ Instructions to install/deploy xenballoond (in Redhat-based system): xenballoond.conf TODO: -080630 modifications to support SUSE-based and debian-based guests 080630 domain0 ballooning policy module 080630 experiment with more aggressive (optionally) memory minimum targets 080630 BUG: xenballoond doesn't properly record the fact that it's running; diff --git a/tools/xenballoon/xenballoond.init b/tools/xenballoon/xenballoond.init index 851a10387f..00dba2a70f 100644 --- a/tools/xenballoon/xenballoond.init +++ b/tools/xenballoon/xenballoond.init @@ -29,6 +29,8 @@ if [ -f /etc/sysconfig/xenballoon.conf ]; then . /etc/sysconfig/xenballoon.conf +elif [ -f /etc/default/xenballoon.conf ]; then + . /etc/default/xenballoon.conf fi # Check that balloon driver is present |