make sliver-ovs use the configure variables
authorGiuseppe Lettieri <g.lettieri@iet.unipi.it>
Mon, 17 Sep 2012 08:23:32 +0000 (10:23 +0200)
committerGiuseppe Lettieri <g.lettieri@iet.unipi.it>
Mon, 17 Sep 2012 13:20:15 +0000 (15:20 +0200)
Makefile.am
planetlab/automake.mk
planetlab/scripts/sliver-ovs.in [moved from planetlab/scripts/sliver-ovs with 95% similarity]

index 932f495..887b1d7 100644 (file)
@@ -104,6 +104,7 @@ ro_shell = printf '\043 Generated automatically -- do not modify!    -*- buffer-
 
 SUFFIXES += .in
 .in:
 
 SUFFIXES += .in
 .in:
+       @mkdir -p $$(dirname $@)
        $(PERL) $(srcdir)/build-aux/soexpand.pl -I$(srcdir) < $< | \
            sed \
                -e 's,[@]PKIDIR[@],$(PKIDIR),g' \
        $(PERL) $(srcdir)/build-aux/soexpand.pl -I$(srcdir) < $< | \
            sed \
                -e 's,[@]PKIDIR[@],$(PKIDIR),g' \
index ccc4f7d..efccfa9 100644 (file)
@@ -14,3 +14,6 @@ planetlab_pltap_ovs_pltap_ovs_SOURCES += planetlab/pltap-ovs/tunalloc.h
 
 planetlab_vsysc_vsysc_SOURCES =
 planetlab_vsysc_vsysc_SOURCES += planetlab/vsysc/vsysc.c
 
 planetlab_vsysc_vsysc_SOURCES =
 planetlab_vsysc_vsysc_SOURCES += planetlab/vsysc/vsysc.c
+
+EXTRA_DIST += \
+       planetlab/scripts/sliver-ovs.in
similarity index 95%
rename from planetlab/scripts/sliver-ovs
rename to planetlab/scripts/sliver-ovs.in
index 87f173e..db6a2a6 100755 (executable)
@@ -6,18 +6,18 @@
 COMMAND=$0
 
 #################### global vars
 COMMAND=$0
 
 #################### global vars
-RUN_DIR=/var/run/openvswitch
-DB_CONF_FILE=/etc/openvswitch/conf.db
-DB_SCHEMA=/usr/share/openvswitch/vswitch.ovsschema
-DB_PID_FILE=/var/run/openvswitch/db.pid
-DB_LOG=/var/log/ovs-db.log
+RUN_DIR=@RUNDIR@
+DB_CONF_FILE=@DBDIR@/conf.db
+DB_SCHEMA=@pkgdatadir@/vswitch.ovsschema
+DB_PID_FILE=$RUN_DIR/db.pid
+DB_LOG=@LOGDIR@/ovs-db.log
 DB_CTL_PATTERN='ovsdb-server.*.ctl'
 ##
 DB_CTL_PATTERN='ovsdb-server.*.ctl'
 ##
-DB_SOCKET=/var/run/openvswitch/db.sock
+DB_SOCKET=$RUN_DIR/db.sock
 ##
 ##
-SWITCH_PID_FILE=/var/run/openvswitch/switch.pid
-SWITCH_LOG=/var/log/ovs-switch.log
-SWITCH_SOCKET=/var/run/openvswitch/switch.sock
+SWITCH_PID_FILE=$RUN_DIR/switch.pid
+SWITCH_LOG=@LOGDIR@/ovs-switch.log
+SWITCH_SOCKET=@RUNDIR@/switch.sock
 
 #################### helper functions
 
 
 #################### helper functions