diff options
Diffstat (limited to 'ctdb/tests/UNIT/eventscripts/etc-ctdb')
-rw-r--r-- | ctdb/tests/UNIT/eventscripts/etc-ctdb/public_addresses | 9 | ||||
-rwxr-xr-x | ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local | 59 |
2 files changed, 68 insertions, 0 deletions
diff --git a/ctdb/tests/UNIT/eventscripts/etc-ctdb/public_addresses b/ctdb/tests/UNIT/eventscripts/etc-ctdb/public_addresses new file mode 100644 index 0000000..cd2f6be --- /dev/null +++ b/ctdb/tests/UNIT/eventscripts/etc-ctdb/public_addresses @@ -0,0 +1,9 @@ +10.0.0.1/24 dev123 +10.0.0.2/24 dev123 +10.0.0.3/24 dev123 +10.0.0.4/24 dev123 +10.0.0.5/24 dev123 +10.0.0.6/24 dev123 +10.0.1.1/24 dev456 +10.0.1.2/24 dev456 +10.0.1.3/24 dev456 diff --git a/ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local b/ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local new file mode 100755 index 0000000..2f506e9 --- /dev/null +++ b/ctdb/tests/UNIT/eventscripts/etc-ctdb/rc.local @@ -0,0 +1,59 @@ +# Hey Emacs, this is a -*- shell-script -*- !!! :-) + +# Always use stub version of service command +service () +{ + "${CTDB_HELPER_BINDIR}/service" "$@" +} + +nice_service () +{ + nice "${CTDB_HELPER_BINDIR}/service" "$@" +} + +# Always succeeds +set_proc () { : ; } +set_proc_maybe () { : ; } + +get_proc () +{ + case "$1" in + net/bonding/*) + cat "$FAKE_PROC_NET_BONDING/${1##*/}" + ;; + sys/net/ipv4/conf/all/arp_filter) + echo 1 + ;; + sys/net/ipv4/conf/all/promote_secondaries) + echo 1 + ;; + fs/nfsd/threads) + echo "$FAKE_NFSD_THREAD_PIDS" | wc -w + ;; + */stack) + echo "[<ffffffff87654321>] fake_stack_trace_for_pid_${1}+0x0/0xff" + ;; + meminfo) + echo "$FAKE_PROC_MEMINFO" + ;; + locks) + echo "$FAKE_PROC_LOCKS" + ;; + *) + echo "get_proc: \"$1\" not implemented" + exit 1 + esac +} + +# Do not actually background - we want to see the output +background_with_logging () +{ + "$@" 2>&1 </dev/null | sed -e 's@^@\&@' +} + +script_log () +{ + cat +} + +CTDB_INIT_STYLE="${EVENTSCRIPT_TESTS_INIT_STYLE:-redhat}" |