X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=7cb8a6563e76946d207899f677796ef251d1152f;hb=7e6ada0e30f7196247f52960a630c4db71ca8690;hp=9b10e44882fcfe36853904e862f2707eee5ca1d1;hpb=564e963c5c8cff7c2717c2e5c7b5683dc2ed59c9;p=bootmanager.git diff --git a/Makefile b/Makefile index 9b10e44..7cb8a65 100644 --- a/Makefile +++ b/Makefile @@ -2,25 +2,30 @@ # $Id: Makefile 682 2007-07-19 09:00:25Z thierry $ # +########## make sync PLCHOST=hostname ########## make sync PLCHOST=hostname ifdef PLCHOST -PLCSSH:=root@$(PLCHOST) +ifdef VSERVER +PLCSSH:=root@$(PLCHOST):/vservers/$(VSERVER) +endif endif -LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' +LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' --exclude debug_root_ssh_key RSYNC_EXCLUDES := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES) RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,) RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES) sync: ifeq (,$(PLCSSH)) - echo "sync: You must define target host as PLCHOST on the command line" - echo " e.g. make sync PLCHOST=private.one-lab.org" ; exit 1 + echo "sync: You must define PLCHOST and VSERVER on the command line" + echo " e.g. make sync PLCHOST=private.one-lab.org VSERVER=myplc01" ; exit 1 else - +$(RSYNC) source $(PLCSSH):/plc/root/usr/share/bootmanager/ - ssh $(PLCSSH) chroot /plc/root service plc start bootmanager + +$(RSYNC) source $(PLCSSH)/usr/share/bootmanager/ + ssh root@$(PLCHOST) vserver $(VSERVER) exec service plc start bootmanager endif ########## tags: find . '(' -name '*.py' -o -name '*.spec' ')' | xargs etags + +.PHONY: tags