X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=cb724a1dba2a799d45b64216ab66803b184a5e6f;hb=21b4f7a59f68f5eb6acbc66f3a1fdc55675e405c;hp=a69c9df51240c79e338aa3b359eaf3ae345074cc;hpb=a6a6fb657c92ac55d0bc24ffbb98d29438530ade;p=myplc.git diff --git a/Makefile b/Makefile index a69c9df..cb724a1 100644 --- a/Makefile +++ b/Makefile @@ -1,29 +1,30 @@ -# -# $Id$ -# - ########## tags: - find . -type f | egrep -v '.svn/|~$$' | xargs etags + find . -type f | egrep -v '\.git/|~$$' | xargs etags .PHONY: tags ########## sync # 2 forms are supported # (*) if your plc root context has direct ssh access: -# make sync PLC=boot.planet-lab.eu -# (*) otherwise, entering through the root context -# make sync PLCHOST=testplc.onelab.eu GUEST=vplc03.inria.fr - -PLCHOST ?= testplc.onelab.eu +# make sync PLC=private.one-lab.org +# (*) otherwise, for test deployments, use on your testmaster +# $ run export +# and cut'n paste the export lines before you run make sync -ifdef GUEST -SSHURL:=root@$(PLCHOST):/vservers/$(GUEST) -SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST) -endif ifdef PLC SSHURL:=root@$(PLC):/ SSHCOMMAND:=ssh root@$(PLC) +else +ifdef PLCHOSTLXC +SSHURL:=root@$(PLCHOSTLXC):/var/lib/lxc/$(GUESTNAME)/rootfs +SSHCOMMAND:=ssh root@$(PLCHOSTLXC) ssh $(GUESTHOSTNAME) +else +ifdef PLCHOSTVS +SSHURL:=root@$(PLCHOSTVS):/vservers/$(GUESTNAME) +SSHCOMMAND:=ssh root@$(PLCHOSTVS) vserver $(GUESTNAME) exec +endif +endif endif LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' @@ -33,9 +34,10 @@ RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES) sync: ifeq (,$(SSHURL)) - @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line" - @echo " e.g. make sync PLC=boot.planet-lab.eu" - @echo " or make sync PLCHOST=testplc.onelab.eu GUEST=vplc03.inria.fr" + @echo "sync: I need more info from the command line, e.g." + @echo " make sync PLC=boot.planetlab.eu" + @echo " make sync PLCHOSTVS=.. GUESTNAME=.." + @echo " make sync PLCHOSTLXC=.. GUESTNAME=.. GUESTHOSTNAME=.." @exit 1 else +$(RSYNC) plc.init $(SSHURL)/etc/init.d/plc