* build_probe: Set RELAYFS correctly.
* Makefile.template: Fix for RELAYFS.
* stp: Moved here. All probes now use this copy.
* ALL/stp: source the master copy of stp.
+2005-07-11 Martin Hunt <hunt@redhat.com>
+
+ * build_probe: Set RELAYFS correctly.
+
+ * Makefile.template: Fix for RELAYFS.
+
+ * stp: Moved here. All probes now use this copy.
+
+ * ALL/stp: source the master copy of stp.
+
2005-07-08 Martin Hunt <hunt@redhat.com>
* ALL: Use new runtime.h. Change init_module()
KALLSYMS_LOOKUP := 0x$(firstword $(shell grep " kallsyms_lookup$$" /boot/System.map-$(KVERSION)))
KTA := 0x$(firstword $(shell grep "__kernel_text_address" /boot/System.map-$(KVERSION)))
-FLAGS := -I $(RT) -I $(RT)/relayfs -D KALLSYMS_LOOKUP_NAME=$(KALLSYMS_LOOKUP_NAME) -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP) -DKTA=$(KTA)
+FLAGS := -I $(RT) RELAYFS -D KALLSYMS_LOOKUP_NAME=$(KALLSYMS_LOOKUP_NAME) -D KALLSYMS_LOOKUP=$(KALLSYMS_LOOKUP) -DKTA=$(KTA)
DFLAGS := $(FLAGS) -D DEBUG
#!/bin/bash
-if [ -n "$1" ]
-then
- modulename=$1
-else
- echo "Usage: stp modulename"
- exit
-fi
-
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ]
-then
- /sbin/insmod ../../relayfs/relayfs.ko
-fi
-
-if [ ! -d "/mnt/relay" ]
-then
- mkdir /mnt/relay
-fi
-
-MOUNT=`mount | grep relayfs |awk '{print $1}'`
-if [ "$MOUNT" != "relayfs" ]
-then
- mount -t relayfs relayfs /mnt/relay
-fi
-
-STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
-if [ "$STP_CONTROL" != "stp_control" ]
-then
- /sbin/insmod ../../transport/stp-control.ko
-fi
-
-#/sbin/insmod $modulename
-
-# print to screen only
-#../../stpd/stpd -p $modulename
-
-# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-../../stpd/stpd $modulename
-
-# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-#../../stpd/stpd -q $modulename
+source ../stp
exit
fi
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ]
+RELAYFS=`grep " relayfs_poll" /boot/System.map-\`uname -r\``
+if [ -z "$RELAYFS" ]
then
+ RELAYFS=`lsmod | grep relayfs`
+ if [ -z "$RELAYFS" ]
+ then
/sbin/insmod ../../relayfs/relayfs.ko
+ fi
fi
if [ ! -d "/mnt/relay" ]
}
# use Makefile.template to generate a Makefile
-proc create_makefile {target} {
+proc create_makefile {target relayfs} {
if {[catch {open ../Makefile.template r} fd]} {
puts "ERROR opening ../Makefile.template"
exit -1
if {[regsub XXX $line $target newline]} {
set line $newline
}
+ if {[regsub RELAYFS $line $relayfs newline]} {
+ set line $newline
+ }
puts $mfd $line
}
close $fd
}
}
+set relayfs ""
+if {![file exists /lib/modules/[exec uname -r]/build/include/linux/relayfs_fs.h]} {
+ set relayfs {-I $(RT)/relayfs}
+}
+
if {![catch {open targets r} tfd]} {
while {[gets $tfd line] >= 0} {
set target [lindex $line 0]
- create_makefile $target
+ create_makefile $target $relayfs
build $target
catch {exec /bin/rm Makefile}
}
#!/bin/bash
-if [ -n "$1" ]
-then
- modulename=$1
-else
- echo "Usage: stp modulename"
- exit
-fi
-
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ]
-then
- /sbin/insmod ../../relayfs/relayfs.ko
-fi
-
-if [ ! -d "/mnt/relay" ]
-then
- mkdir /mnt/relay
-fi
-
-MOUNT=`mount | grep relayfs |awk '{print $1}'`
-if [ "$MOUNT" != "relayfs" ]
-then
- mount -t relayfs relayfs /mnt/relay
-fi
-
-STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
-if [ "$STP_CONTROL" != "stp_control" ]
-then
- /sbin/insmod ../../transport/stp-control.ko
-fi
-
-#/sbin/insmod $modulename
-
-# print to screen only
-#../../stpd/stpd -p $modulename
-
-# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-../../stpd/stpd $modulename
-
-# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-#../../stpd/stpd -q $modulename
+source ../stp
#!/bin/bash
-if [ -n "$1" ]
-then
- modulename=$1
-else
- echo "Usage: stp modulename"
- exit
-fi
-
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ]
-then
- /sbin/insmod ../../relayfs/relayfs.ko
-fi
-
-if [ ! -d "/mnt/relay" ]
-then
- mkdir /mnt/relay
-fi
-
-MOUNT=`mount | grep relayfs |awk '{print $1}'`
-if [ "$MOUNT" != "relayfs" ]
-then
- mount -t relayfs relayfs /mnt/relay
-fi
-
-STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
-if [ "$STP_CONTROL" != "stp_control" ]
-then
- /sbin/insmod ../../transport/stp-control.ko
-fi
-
-#/sbin/insmod $modulename
-
-# print to screen only
-#../../stpd/stpd -p $modulename
-
-# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-../../stpd/stpd $modulename
-
-# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-#../../stpd/stpd -q $modulename
+source ../stp
#!/bin/bash
-if [ -n "$1" ]
-then
- modulename=$1
-else
- echo "Usage: stp modulename"
- exit
-fi
-
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ]
-then
- /sbin/insmod ../../relayfs/relayfs.ko
-fi
-
-if [ ! -d "/mnt/relay" ]
-then
- mkdir /mnt/relay
-fi
-
-MOUNT=`mount | grep relayfs |awk '{print $1}'`
-if [ "$MOUNT" != "relayfs" ]
-then
- mount -t relayfs relayfs /mnt/relay
-fi
-
-STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
-if [ "$STP_CONTROL" != "stp_control" ]
-then
- /sbin/insmod ../../transport/stp-control.ko
-fi
-
-#/sbin/insmod $modulename
-
-# print to screen only
-#../../stpd/stpd -p $modulename
-
-# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-../../stpd/stpd $modulename
-
-# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-#../../stpd/stpd -q $modulename
+source ../stp
--- /dev/null
+#!/bin/bash
+if [ -n "$1" ]
+then
+ modulename=$1
+else
+ echo "Usage: stp modulename"
+ exit
+fi
+
+RELAYFS=`grep " relayfs_poll" /boot/System.map-\`uname -r\``
+if [ -z "$RELAYFS" ]
+then
+ RELAYFS=`lsmod | grep relayfs`
+ if [ -z "$RELAYFS" ]
+ then
+ /sbin/insmod ../../relayfs/relayfs.ko
+ fi
+fi
+
+if [ ! -d "/mnt/relay" ]
+then
+ mkdir /mnt/relay
+fi
+
+MOUNT=`mount | grep relayfs |awk '{print $1}'`
+if [ "$MOUNT" != "relayfs" ]
+then
+ mount -t relayfs relayfs /mnt/relay
+fi
+
+STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
+if [ "$STP_CONTROL" != "stp_control" ]
+then
+ /sbin/insmod ../../transport/stp-control.ko
+fi
+
+# print to screen only
+#../../stpd/stpd -p $modulename
+
+# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
+../../stpd/stpd $modulename
+
+# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
+#../../stpd/stpd -q $modulename
#!/bin/bash
-if [ -n "$1" ]
-then
- modulename=$1
-else
- echo "Usage: stp modulename"
- exit
-fi
-
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ]
-then
- /sbin/insmod ../../relayfs/relayfs.ko
-fi
-
-if [ ! -d "/mnt/relay" ]
-then
- mkdir /mnt/relay
-fi
-
-MOUNT=`mount | grep relayfs |awk '{print $1}'`
-if [ "$MOUNT" != "relayfs" ]
-then
- mount -t relayfs relayfs /mnt/relay
-fi
-
-STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
-if [ "$STP_CONTROL" != "stp_control" ]
-then
- /sbin/insmod ../../transport/stp-control.ko
-fi
-
-#/sbin/insmod $modulename
-
-# print to screen only
-#../../stpd/stpd -p $modulename
-
-# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-../../stpd/stpd $modulename
-
-# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-#../../stpd/stpd -q $modulename
+source ../stp
#!/bin/bash
-if [ -n "$1" ]
-then
- modulename=$1
-else
- echo "Usage: stp modulename"
- exit
-fi
-
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ]
-then
- /sbin/insmod ../../relayfs/relayfs.ko
-fi
-
-if [ ! -d "/mnt/relay" ]
-then
- mkdir /mnt/relay
-fi
-
-MOUNT=`mount | grep relayfs |awk '{print $1}'`
-if [ "$MOUNT" != "relayfs" ]
-then
- mount -t relayfs relayfs /mnt/relay
-fi
-
-STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
-if [ "$STP_CONTROL" != "stp_control" ]
-then
- /sbin/insmod ../../transport/stp-control.ko
-fi
-
-#/sbin/insmod $modulename
-
-# print to screen only
-#../../stpd/stpd -p $modulename
-
-# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-../../stpd/stpd $modulename
-
-# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-#../../stpd/stpd -q $modulename
+source ../stp
#!/bin/bash
-if [ -n "$1" ]
-then
- modulename=$1
-else
- echo "Usage: stp modulename"
- exit
-fi
-
-RELAYFS=`lsmod | grep relayfs |awk '{print $1}'`
-if [ "$RELAYFS" != "relayfs" ]
-then
- /sbin/insmod ../../relayfs/relayfs.ko
-fi
-
-if [ ! -d "/mnt/relay" ]
-then
- mkdir /mnt/relay
-fi
-
-MOUNT=`mount | grep relayfs |awk '{print $1}'`
-if [ "$MOUNT" != "relayfs" ]
-then
- mount -t relayfs relayfs /mnt/relay
-fi
-
-STP_CONTROL=`lsmod | grep stp_control |awk '{print $1}'`
-if [ "$STP_CONTROL" != "stp_control" ]
-then
- /sbin/insmod ../../transport/stp-control.ko
-fi
-
-#/sbin/insmod $modulename
-
-# print to screen only
-#../../stpd/stpd -p $modulename
-
-# print to screen and log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-../../stpd/stpd $modulename
-
-# no screen, log to files (file logging only if #define STP_NETLINK_ONLY commented out in module)
-#../../stpd/stpd -q $modulename
+source ../stp