From: Sapan Bhatia Date: Thu, 19 Mar 2009 19:01:27 +0000 (+0000) Subject: Merging recent changes from the 4.2 branch into trunk. X-Git-Tag: vsys-0.9-0~35 X-Git-Url: http://git.onelab.eu/?p=vsys.git;a=commitdiff_plain;h=3d46be6b425d8990de5531859f03539f1f49d1ef Merging recent changes from the 4.2 branch into trunk. --- diff --git a/Makefile b/Makefile index a79ff35..b5272ca 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -all: vsys factory/.done +all: vsys include .dep @@ -39,18 +39,13 @@ vsys: ocaml_inotify-0.4/inotify.cmxa globals.cmx fdwatcher.cmx conffile.cmx spli vsys.b: ocaml_inotify-0.4/inotify.cma inotify.cmi globals.ml fdwatcher.ml dirwatcher.ml directfifowatcher.ml frontend.ml backend.ml main.ml ocamlc -g str.cma unix.cma ocaml_inotify-0.4/inotify.cma globals.cmo fdwatcher.cmo dirwatcher.cmo directfifowatcher.cmo frontend.cmo backend.cmo str.cma conffile.cmo main.cmo -o vsys.b -factory/.done: factory/* - $(MAKE) -C factory/ - -install: vsys factory/.done +install: vsys cp vsys $(INSTALL_DIR)/usr/bin cp vsys-initscript $(INSTALL_DIR)/etc/init.d/vsys - cp -fR factory/ factory-exec/ dep: ocamldep *.ml > .dep clean: $(MAKE) -C ocaml_inotify-0.4 clean - $(MAKE) -C factory clean rm -f *.cmi *.cmx sys usys *.o vsys vsys.b *.html *.css diff --git a/backend.ml b/backend.ml index b2c3d24..535c549 100644 --- a/backend.ml +++ b/backend.ml @@ -41,7 +41,7 @@ class backendHandler dir_root (frontend_lst: frontendHandler list) = (** Regular expression that defines a legal script name. Filter out * temporary files using it *) - val file_regexp = Str.regexp "^[a-zA-Z][a-zA-Z0-9_'.''-']*$" + val file_regexp = Str.regexp "^[a-zA-Z][a-zA-Z0-9_\.\-]*$" val acl_file_regexp = Str.regexp ".*acl$" (** Somebody created a new directory *) @@ -84,7 +84,7 @@ class backendHandler dir_root (frontend_lst: frontendHandler list) = with _ -> None - method is_acl fname = Str.string_match acl_file_regexp fname 1 + method is_acl fname = Str.string_match acl_file_regexp fname 0 (** Gets called every time there's an inotify event at the backend @param dirname Name of the backend directory diff --git a/factory/ADD_YOUR_SCRIPT_TO_THIS_FILE_OR_ELSE_IT_WONT_GET_DEPLOYED b/factory/ADD_YOUR_SCRIPT_TO_THIS_FILE_OR_ELSE_IT_WONT_GET_DEPLOYED deleted file mode 100644 index e41e335..0000000 --- a/factory/ADD_YOUR_SCRIPT_TO_THIS_FILE_OR_ELSE_IT_WONT_GET_DEPLOYED +++ /dev/null @@ -1,9 +0,0 @@ -comon_exec -dcookie -hide_netif -pfmount -pl-ps -portsummary -setup-link -setup-nat -vtop diff --git a/factory/Makefile b/factory/Makefile deleted file mode 100644 index f9f31a2..0000000 --- a/factory/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -CC=gcc -CFLAGS=-g -O2 - -SCRIPT_LIST:=$(shell cat ADD_YOUR_SCRIPT_TO_THIS_FILE_OR_ELSE_IT_WONT_GET_DEPLOYED | sed 's/\n/ /g') - -all: dcookie - touch .done - cp $(SCRIPT_LIST) exec - - -clean: - rm -f exec/* diff --git a/factory/dcookie.c b/factory/dcookie.c deleted file mode 100644 index ca22353..0000000 --- a/factory/dcookie.c +++ /dev/null @@ -1,36 +0,0 @@ -/* dcookie retrieval vsys entry, required by Chopstix. - * The lookup_dcookie system call retrieves a pathname */ - -#define __NR_LOOKUP_DCOOKIE 253 - -#include -/*#include */ -#include -#include -#include -#include -#include - -#define INT64_MAXSZ "18446744073709551615Z" - -int lookup_dcookie(uint64_t cookie, char * buf, size_t size) -{ - return syscall(__NR_LOOKUP_DCOOKIE, cookie, buf, size); -} - -int main(int argc,char *argv[]) { - /* fs/dcookie.c uses PAGE_SIZE */ - char path_buf[16384],dcookie_buf[sizeof(INT64_MAXSZ)]; - - /* In case nothing happens */ - path_buf[0]='\0'; - - while (fgets(dcookie_buf, sizeof(dcookie_buf),stdin)) { - if (lookup_dcookie(atoll(dcookie_buf), path_buf, sizeof(path_buf))>0) { - printf("%s\n",path_buf); - } - else { - printf("% Not found\n"); - } - } -} diff --git a/nfsmount b/factory/nfsmount similarity index 100% rename from nfsmount rename to factory/nfsmount diff --git a/factory/setup-link b/factory/setup-link index 58a431f..e5cbd2f 100755 --- a/factory/setup-link +++ b/factory/setup-link @@ -6,16 +6,7 @@ SLICE=$1 SLICEID=`id -u $SLICE` read INDEX read REMOTE - -KEYFILE="/etc/vini/egre-keys.txt" -if [ -e "$KEYFILE" ]; then - KEY=$( awk -v slice=$SLICE '$1 == slice {print $2}' $KEYFILE ) -fi -if [ -z "$KEY" ]; then - echo "No EGRE key found for slice $SLICE!" - echo "Please send mail to vini-users@lists.planet-lab.org." - exit 1 -fi +read KEY LINK=${KEY}if${INDEX} @@ -24,7 +15,7 @@ modprobe etun ### Setup EGRE tunnel EGRE=d$LINK -$IP tunnel add $EGRE mode gre/eth remote $REMOTE key $KEY ttl 64 +$IP tunnel add $EGRE mode gre/eth remote $REMOTE key $KEY $IP link set $EGRE up ### Setup etun diff --git a/vsys.spec b/vsys.spec index a411c6f..dff9d79 100644 --- a/vsys.spec +++ b/vsys.spec @@ -9,8 +9,8 @@ %define url $URL$ %define name vsys -%define version 0.8 -%define taglevel 0 +%define version 0.7 +%define taglevel 26 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} @@ -50,7 +50,7 @@ make mkdir -p $RPM_BUILD_ROOT/usr/bin mkdir -p $RPM_BUILD_ROOT/etc/init.d mkdir -p $RPM_BUILD_ROOT/vsys -cp factory/exec/* $RPM_BUILD_ROOT/vsys +cp factory/* $RPM_BUILD_ROOT/vsys cp vsys $RPM_BUILD_ROOT/usr/bin cp vsys-initscript $RPM_BUILD_ROOT/etc/init.d/vsys cp vsys.conf $RPM_BUILD_ROOT/etc @@ -77,6 +77,24 @@ fi %postun %changelog +* Tue Feb 24 2009 Sapan Bhatia - vsys-0.7-26 +- Tagging to force an update. + +* Fri Feb 20 2009 Sapan Bhatia - vsys-0.7-25 + +* Fri Feb 20 2009 Sapan Bhatia - vsys-0.7-24 + +* Thu Feb 19 2009 Sapan Bhatia - vsys-0.7-23 + +* Tue Sep 30 2008 Sapan Bhatia - vsys-0.7-22 +- Tagging a trivial fix. + +* Thu Sep 25 2008 Stephen Soltesz - vsys-0.7-21 +- includes new portsummary script for CoMon + +* Mon Aug 11 2008 Stephen Soltesz - vsys-0.7-20 +- trying to fix the taglevel relative to the branch name + * Thu Jul 17 2008 Sapan Bhatia - vsys-0.7-18 - Change for someone at Imperial.ac.uk, who wants access to Netflow data.