From: Martin Schwenke Date: Thu, 8 Feb 2018 05:29:05 +0000 (+1100) Subject: ctdb-tests: Move variable FAKE_IP_STATE into the ip stub X-Git-Tag: talloc-2.1.13~193 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=26329aa035674bc5a5779b670b8daf6f18b148d7;p=thirdparty%2Fsamba.git ctdb-tests: Move variable FAKE_IP_STATE into the ip stub It is the only user of this variable. This is now a subdirectory of FAKE_NETWORK_STATE. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/eventscripts/scripts/local.sh b/ctdb/tests/eventscripts/scripts/local.sh index 48fdf31bc6e..3f237d0d842 100644 --- a/ctdb/tests/eventscripts/scripts/local.sh +++ b/ctdb/tests/eventscripts/scripts/local.sh @@ -85,15 +85,6 @@ setup_generic () mkdir -p "$FAKE_ETHTOOL_LINK_DOWN" rm -f "$FAKE_ETHTOOL_LINK_DOWN"/* - # This can only have 2 levels. We don't want to resort to usings - # something dangerous like "rm -r" setup time. - export FAKE_IP_STATE="$EVENTSCRIPTS_TESTS_VAR_DIR/fake-ip-state" - mkdir -p "$FAKE_IP_STATE" - rm -f "$FAKE_IP_STATE"/*/* - rm -f "$FAKE_IP_STATE"/* 2>/dev/null || true - rmdir "$FAKE_IP_STATE"/* 2>/dev/null || true - - export CTDB_DBDIR="${EVENTSCRIPTS_TESTS_VAR_DIR}/db" export CTDB_DBDIR_PERSISTENT="${CTDB_DBDIR}/persistent" export CTDB_DBDIR_STATE="${CTDB_DBDIR}/state" diff --git a/ctdb/tests/eventscripts/stubs/ip b/ctdb/tests/eventscripts/stubs/ip index af155beb188..1c4ad35b50a 100755 --- a/ctdb/tests/eventscripts/stubs/ip +++ b/ctdb/tests/eventscripts/stubs/ip @@ -1,5 +1,8 @@ #!/bin/sh +FAKE_IP_STATE="${FAKE_NETWORK_STATE}/ip-state" +mkdir -p "$FAKE_IP_STATE" + promote_secondaries=true not_implemented ()