From: Thierry Parmentelat Date: Mon, 20 Jan 2014 07:37:07 +0000 (+0100) Subject: a safer way to sync code on a running node - no Makefile.vsh anyway X-Git-Tag: lxc-userspace-1.0-9~11 X-Git-Url: http://git.onelab.eu/?p=lxc-userspace.git;a=commitdiff_plain;h=9ca8cb1d44dd4cddbfb22eb3dd9c632ab0f1ac11 a safer way to sync code on a running node - no Makefile.vsh anyway --- diff --git a/Makefile b/Makefile index 15dacd5..3e530dd 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ setns: setns.c # $ export NODE=vnode01.pl.sophia.inria.fr # and then just run # $ make sync -# this will attempt to compile vsh from vsh.c (and will push Makefile.vsh in /usr/sbin/) +# this will attempt to compile vsh from vsh.c # so you might have to yum install gcc LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' @@ -37,10 +37,12 @@ ifeq (,$(NODEURL)) @echo " e.g. make sync NODE=vnode01.inria.fr" @exit 1 else - +$(RSYNC) ./lxcsu ./lxcsu-internal ./vsh.c ./Makefile.vsh $(NODEURL)/usr/sbin/ - ssh -i $(NODE).key.rsa root@$(NODE) make -C /usr/sbin -f Makefile.vsh vsh - ssh -i $(NODE).key.rsa root@$(NODE) chown root:root /usr/sbin/lxcsu /usr/sbin/vsh - ssh -i $(NODE).key.rsa root@$(NODE) chmod u+s /usr/sbin/lxcsu /usr/sbin/vsh + +$(RSYNC) ./lxcsu ./lxcsu-internal ./vsh.c $(NODEURL)/usr/sbin/ + ssh -i $(NODE).key.rsa root@$(NODE) chown root:root /usr/sbin/lxcsu + ssh -i $(NODE).key.rsa root@$(NODE) chmod u+s /usr/sbin/lxcsu + ssh -i $(NODE).key.rsa root@$(NODE) gcc -o /usr/sbin/vsh /usr/sbin/vsh.c + ssh -i $(NODE).key.rsa root@$(NODE) chown root:root /usr/sbin/vsh + ssh -i $(NODE).key.rsa root@$(NODE) chmod u+s /usr/sbin/vsh endif ### fetching the key