updated configuration to define the core bin dir within constants, updated code to use the core bin dir for vnoded and vcmd, based on using the fpm build system

This commit is contained in:
Blake J. Harnden 2018-01-04 10:09:35 -08:00
parent 42bcb1c79d
commit e4a0069bc3
4 changed files with 12 additions and 5 deletions

View file

@ -97,8 +97,7 @@ fpm -s dir -t $1 -n core-gui \
endef
.PHONY: fpm
fpm:
rm -f *.deb && rm -f *.rpm
fpm: clean-local-fpm
$(call fpm-gui,rpm,-d "tkimg")
$(call fpm-gui,deb,-d "libtk-img")
$(call fpm-python,rpm,daemon/ns3/setup.py)
@ -129,6 +128,11 @@ fpm:
--deb-recommends quagga \
daemon/src/setup.py daemon/setup.py
.PHONY: clean-local-fpm
clean-local-fpm:
-rm -rf *.deb
-rm -rf *.rpm
.PHONY: core-restart
core-restart:
/etc/init.d/core-daemon stop
@ -136,6 +140,8 @@ core-restart:
rm -f /var/log/core-daemon.log
/etc/init.d/core-daemon start
clean-local: clean-local-fpm
.version: Makefile
echo $(CORE_VERSION) > $@

View file

@ -4,7 +4,8 @@ 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 = "@BINDIR@"
CORE_SBIN_DIR = "@SBINDIR@"
CORE_BIN_DIR = "@BINDIR@"
BRCTL_BIN = "@brctl_path@/brctl"
SYSCTL_BIN = "@sysctl_path@/sysctl"

View file

@ -73,7 +73,7 @@ class SimpleLxcNode(PyCoreNode):
"""
if self.up:
raise Exception("already up")
vnoded = ["%s/vnoded" % constants.CORE_SBIN_DIR, "-v", "-c", self.ctrlchnlname,
vnoded = ["%s/vnoded" % constants.CORE_BIN_DIR, "-v", "-c", self.ctrlchnlname,
"-l", self.ctrlchnlname + ".log",
"-p", self.ctrlchnlname + ".pid"]
if self.nodedir:

View file

@ -17,7 +17,7 @@ USE_VCMD_MODULE = True
if USE_VCMD_MODULE:
import vcmd
VCMD = os.path.join(constants.CORE_SBIN_DIR, "vcmd")
VCMD = os.path.join(constants.CORE_BIN_DIR, "vcmd")
class VnodeClient(object):