Add network sync arm/disarm
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Fri, 23 Oct 2009 13:42:29 +0000 (09:42 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Fri, 23 Oct 2009 13:42:29 +0000 (09:42 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
configure.in
lttctl/Makefile.am
lttctl/ltt-armnetsync.sh [new file with mode: 0755]
lttctl/ltt-disarmnetsync.sh [new file with mode: 0755]

index f56881232e48c199514657377decc4d1ef708a7a..6ce398fc3ecd80c6039be89046ecfa5bf7467aa5 100644 (file)
@@ -23,7 +23,7 @@
 AC_PREREQ(2.57)
 AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
 #AC_WITH_LTDL  # not needed ?
-AM_INIT_AUTOMAKE(ltt-control,0.71-30092009)
+AM_INIT_AUTOMAKE(ltt-control,0.72-23102009)
 AM_CONFIG_HEADER(config.h)
 AM_PROG_LIBTOOL
 
index 12ad501bfc08cce9bcca9c0c7b58b976acc6d167..6c3d063404995bedb1e5ea68ad14976868a02fd6 100644 (file)
@@ -3,10 +3,13 @@
 AM_CFLAGS = -DPACKAGE_DATA_DIR=\""$(datadir)"\" -DPACKAGE_BIN_DIR=\""$(bindir)"\"
 
 bin_PROGRAMS = lttctl
-bin_SCRIPTS = ltt-armall ltt-disarmall ltt-armalluser ltt-disarmalluser \
+bin_SCRIPTS = ltt-armall ltt-disarmall \
+  ltt-armnetsync ltt-disarmnetsync \
+  ltt-armalluser ltt-disarmalluser \
   ltt-armtap ltt-disarmtap
 CLEANFILES = $(bin_SCRIPTS)
 EXTRA_DIST = ltt-armall.sh ltt-disarmall.sh \
+  ltt-armnetsync.sh ltt-disarmnetsync.sh \
   ltt-armalluser.sh ltt-disarmalluser.sh \
   ltt-armtap.sh ltt-disarmtap.sh
 
@@ -22,6 +25,18 @@ ltt-disarmall: ltt-disarmall.sh
        cat $(srcdir)/ltt-disarmall.sh >> ltt-disarmall
        chmod ugo+x ltt-disarmall
 
+ltt-armnetsync: ltt-armnetsync.sh
+       rm -f ltt-armnetsync
+       echo "#!"$(BASH) > ltt-armnetsync
+       cat $(srcdir)/ltt-armnetsync.sh >> ltt-armnetsync
+       chmod ugo+x ltt-armnetsync
+
+ltt-disarmnetsync: ltt-disarmnetsync.sh
+       rm -f ltt-disarmnetsync
+       echo "#!"$(BASH) > ltt-disarmnetsync
+       cat $(srcdir)/ltt-disarmnetsync.sh >> ltt-disarmnetsync
+       chmod ugo+x ltt-disarmnetsync
+
 ltt-armtap: ltt-armtap.sh
        rm -f ltt-armtap
        echo "#!"$(BASH) > ltt-armtap
diff --git a/lttctl/ltt-armnetsync.sh b/lttctl/ltt-armnetsync.sh
new file mode 100755 (executable)
index 0000000..a07b751
--- /dev/null
@@ -0,0 +1,9 @@
+DEBUGFSROOT=$(grep ^debugfs /proc/mounts | head -1 | awk '{print $2}')
+MARKERSROOT=${DEBUGFSROOT}/ltt/markers
+
+echo Connecting network synchronization markers
+
+for m in ${MARKERSROOT}/net/*_extended; do
+       echo Connecting ${m}
+       echo 1 > ${m}/enable
+done
diff --git a/lttctl/ltt-disarmnetsync.sh b/lttctl/ltt-disarmnetsync.sh
new file mode 100755 (executable)
index 0000000..fead515
--- /dev/null
@@ -0,0 +1,9 @@
+DEBUGFSROOT=$(grep ^debugfs /proc/mounts | head -1 | awk '{print $2}')
+MARKERSROOT=${DEBUGFSROOT}/ltt/markers
+
+echo Disconnecting network synchronization markers
+
+for m in ${MARKERSROOT}/net/*_extended; do
+       echo Disconnecting ${m}
+       echo 0 > ${m}/enable
+done
This page took 0.025571 seconds and 4 git commands to generate.