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))
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
- +$(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