initial cleanup passing over all makefiles and configure.ac
This commit is contained in:
parent
ac705f4908
commit
6210e70c80
28 changed files with 328 additions and 641 deletions
|
@ -1,22 +1,18 @@
|
|||
# Constants created by autoconf ./configure script
|
||||
COREDPY_VERSION = "@COREDPY_VERSION@"
|
||||
CORE_STATE_DIR = "@CORE_STATE_DIR@"
|
||||
CORE_CONF_DIR = "@CORE_CONF_DIR@"
|
||||
CORE_DATA_DIR = "@CORE_DATA_DIR@"
|
||||
CORE_LIB_DIR = "@CORE_LIB_DIR@"
|
||||
CORE_SBIN_DIR = "@SBINDIR@"
|
||||
CORE_BIN_DIR = "@BINDIR@"
|
||||
COREDPY_VERSION = "@PACKAGE_VERSION@"
|
||||
CORE_STATE_DIR = "@CORE_STATE_DIR@"
|
||||
CORE_CONF_DIR = "@CORE_CONF_DIR@"
|
||||
CORE_DATA_DIR = "@CORE_DATA_DIR@"
|
||||
CORE_LIB_DIR = "@CORE_LIB_DIR@"
|
||||
|
||||
BRCTL_BIN = "@brctl_path@/brctl"
|
||||
SYSCTL_BIN = "@sysctl_path@/sysctl"
|
||||
IP_BIN = "@ip_path@/ip"
|
||||
TC_BIN = "@tc_path@/tc"
|
||||
EBTABLES_BIN = "@ebtables_path@/ebtables"
|
||||
IFCONFIG_BIN = "@ifconfig_path@/ifconfig"
|
||||
NGCTL_BIN = "@ngctl_path@/ngctl"
|
||||
VIMAGE_BIN = "@vimage_path@/vimage"
|
||||
QUAGGA_STATE_DIR = "@CORE_STATE_DIR@/run/quagga"
|
||||
MOUNT_BIN = "@mount_path@/mount"
|
||||
UMOUNT_BIN = "@umount_path@/umount"
|
||||
OVS_BIN = "@ovs_vs_path@/ovs-vsctl"
|
||||
OVS_FLOW_BIN = "@ovs_of_path@/ovs-ofctl"
|
||||
VNODED_BIN = "@bindir@/vnoded"
|
||||
VCMD_BIN = "@bindir@/vcmd"
|
||||
BRCTL_BIN = "@brctl_path@/brctl"
|
||||
SYSCTL_BIN = "@sysctl_path@/sysctl"
|
||||
IP_BIN = "@ip_path@/ip"
|
||||
TC_BIN = "@tc_path@/tc"
|
||||
EBTABLES_BIN = "@ebtables_path@/ebtables"
|
||||
QUAGGA_STATE_DIR = "@CORE_STATE_DIR@/run/quagga"
|
||||
MOUNT_BIN = "@mount_path@/mount"
|
||||
UMOUNT_BIN = "@umount_path@/umount"
|
||||
OVS_BIN = "@ovs_vs_path@/ovs-vsctl"
|
||||
OVS_FLOW_BIN = "@ovs_of_path@/ovs-ofctl"
|
||||
|
|
|
@ -86,7 +86,7 @@ class SimpleLxcNode(PyCoreNode):
|
|||
|
||||
# create a new namespace for this node using vnoded
|
||||
vnoded = [
|
||||
"%s/vnoded" % constants.CORE_BIN_DIR,
|
||||
constants.VNODED_BIN,
|
||||
"-v",
|
||||
"-c", self.ctrlchnlname,
|
||||
"-l", self.ctrlchnlname + ".log",
|
||||
|
|
|
@ -14,8 +14,6 @@ from core import constants
|
|||
from core import logger
|
||||
from core.misc import utils
|
||||
|
||||
VCMD = os.path.join(constants.CORE_BIN_DIR, "vcmd")
|
||||
|
||||
|
||||
class VnodeClient(object):
|
||||
"""
|
||||
|
@ -134,7 +132,7 @@ class VnodeClient(object):
|
|||
:rtype: int
|
||||
"""
|
||||
args = utils.split_args(args)
|
||||
return os.spawnlp(os.P_WAIT, VCMD, VCMD, "-c", self.ctrlchnlname, "--", *args)
|
||||
return os.spawnlp(os.P_WAIT, constants.VCMD_BIN, constants.VCMD_BIN, "-c", self.ctrlchnlname, "--", *args)
|
||||
|
||||
def redircmd(self, infd, outfd, errfd, args, wait=True):
|
||||
"""
|
||||
|
@ -171,7 +169,7 @@ class VnodeClient(object):
|
|||
:return: terminal command result
|
||||
:rtype: int
|
||||
"""
|
||||
args = ("xterm", "-ut", "-title", self.name, "-e", VCMD, "-c", self.ctrlchnlname, "--", sh)
|
||||
args = ("xterm", "-ut", "-title", self.name, "-e", constants.VCMD_BIN, "-c", self.ctrlchnlname, "--", sh)
|
||||
if "SUDO_USER" in os.environ:
|
||||
args = ("su", "-s", "/bin/sh", "-c",
|
||||
"exec " + " ".join(map(lambda x: "'%s'" % x, args)),
|
||||
|
@ -185,7 +183,7 @@ class VnodeClient(object):
|
|||
:param str sh: shell to execute command in
|
||||
:return: str
|
||||
"""
|
||||
return "%s -c %s -- %s" % (VCMD, self.ctrlchnlname, sh)
|
||||
return "%s -c %s -- %s" % (constants.VCMD_BIN, self.ctrlchnlname, sh)
|
||||
|
||||
def shcmd(self, cmd, sh="/bin/sh"):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue