ia64/xen-unstable

changeset 11855:b75fbced2353

[SOLARIS] The hotplug scripts live in a different place on Solaris.

Signed-off-by: John Levon <john.levon@sun.com>
author kfraser@localhost.localdomain
date Tue Oct 17 18:28:27 2006 +0100 (2006-10-17)
parents eb6680cdbe20
children 9754c40fc673
files tools/python/xen/util/auxbin.py tools/python/xen/xend/XendRoot.py tools/python/xen/xend/osdep.py
line diff
     1.1 --- a/tools/python/xen/util/auxbin.py	Tue Oct 17 18:23:24 2006 +0100
     1.2 +++ b/tools/python/xen/util/auxbin.py	Tue Oct 17 18:28:27 2006 +0100
     1.3 @@ -21,7 +21,7 @@ LIB_64 = "/usr/lib64"
     1.4  LIB_BIN_SUFFIX = "xen/bin"
     1.5  
     1.6  ## The architectures on which the LIB_64 directory is used.  This
     1.7 -# deliberately excludes ia64 and ppc64.
     1.8 +# deliberately excludes ia64 and ppc64, and Solaris.
     1.9  LIB_64_ARCHS = [ 'x86_64', 's390x', 'sparc64']
    1.10  
    1.11  
     2.1 --- a/tools/python/xen/xend/XendRoot.py	Tue Oct 17 18:23:24 2006 +0100
     2.2 +++ b/tools/python/xen/xend/XendRoot.py	Tue Oct 17 18:28:27 2006 +0100
     2.3 @@ -30,6 +30,7 @@ import os.path
     2.4  import string
     2.5  import sys
     2.6  
     2.7 +import osdep
     2.8  import XendLogging
     2.9  from XendError import XendError
    2.10  
    2.11 @@ -46,10 +47,10 @@ class XendRoot:
    2.12      config_var     = "XEND_CONFIG"
    2.13  
    2.14      """Where network control scripts live."""
    2.15 -    network_script_dir = "/etc/xen/scripts"
    2.16 +    network_script_dir = osdep.scripts_dir
    2.17  
    2.18      """Where block control scripts live."""
    2.19 -    block_script_dir = "/etc/xen/scripts"
    2.20 +    block_script_dir = osdep.scripts_dir
    2.21  
    2.22      """Default path to the log file. """
    2.23      logfile_default = "/var/log/xen/xend.log"
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/tools/python/xen/xend/osdep.py	Tue Oct 17 18:28:27 2006 +0100
     3.3 @@ -0,0 +1,27 @@
     3.4 +#!/usr/bin/env python
     3.5 +#
     3.6 +# This library is free software; you can redistribute it and/or
     3.7 +# modify it under the terms of version 2.1 of the GNU Lesser General Public
     3.8 +# License as published by the Free Software Foundation.
     3.9 +#
    3.10 +# This library is distributed in the hope that it will be useful,
    3.11 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.12 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    3.13 +# Lesser General Public License for more details.
    3.14 +#
    3.15 +# You should have received a copy of the GNU Lesser General Public
    3.16 +# License along with this library; if not, write to the Free Software
    3.17 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    3.18 +#
    3.19 +
    3.20 +# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
    3.21 +# Use is subject to license terms.
    3.22 +
    3.23 +import os
    3.24 +
    3.25 +_scripts_dir = {
    3.26 +    "Linux": "/etc/xen/scripts",
    3.27 +    "SunOS": "/usr/lib/xen/scripts",
    3.28 +}
    3.29 +
    3.30 +scripts_dir = _scripts_dir.get(os.uname()[0], "/etc/xen/scripts")