Various tweaks for myplc-native (not thoroughly tested yet) :
[myplc.git] / Makefile
index c71409b..1280862 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,14 +2,17 @@
 # $Id$
 #
 
-BINARIES = plc-config plc-config-tty db-config dns-config refresh-peer.py plc-map.py clean-empty-dirs.py mtail.py renew_reminder.py
+BINARIES = plc-config plc-config-tty db-config dns-config plc-map.py clean-empty-dirs.py mtail.py \
+       support-scripts/renew_reminder.py support-scripts/gen_aliases.py
 INIT_SCRIPTS = api bootcd bootmanager crond db dns functions gpg httpd mail network packages postgresql ssh ssl syslog
 
 INITS=$(addprefix plc.d/,$(INIT_SCRIPTS))
 
 ########## make sync PLCHOST=hostname
 ifdef PLCHOST
-PLCSSH:=root@$(PLCHOST)
+ifdef VSERVER
+PLCSSH:=root@$(PLCHOST):/vservers/$(VSERVER)
+endif
 endif
 
 LOCAL_RSYNC_EXCLUDES   := --exclude '*.pyc' 
@@ -19,17 +22,16 @@ 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) host.init $(PLCSSH):/etc/init.d/plc
-       +$(RSYNC) guest.init $(PLCSSH):/plc/root/etc/init.d/plc
-       +$(RSYNC) $(BINARIES) $(PLCSSH):/plc/root/usr/bin
-       +$(RSYNC) $(INITS) $(PLCSSH):/plc/root/etc/plc.d
-       +$(RSYNC) plc_config.py $(PLCSSH):/plc/root/usr/lib/python2.5/site-packages/plc_config.py
-       +$(RSYNC) default_config.xml $(PLCSSH):/plc/data/etc/planetlab/default_config.xml
+       +$(RSYNC) guest.init $(PLCSSH)/etc/init.d/plc
+       +$(RSYNC) $(BINARIES) $(PLCSSH)/usr/bin
+       +$(RSYNC) $(INITS) $(PLCSSH)/etc/plc.d
+       +$(RSYNC) plc_config.py $(PLCSSH)/usr/lib/python2.5/site-packages/plc_config.py
+       +$(RSYNC) default_config.xml $(PLCSSH)/etc/planetlab/default_config.xml
        @echo XXXXXXXX You might consider running the following command
-       @echo ssh $(PLCSSH) chroot /plc/root service plc start 
+       @echo ssh $(PLCHOST) service plc start 
 endif