public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* fence-agents: master - fence manual: remove hardcoded use of /var
@ 2009-06-24 4:31 Fabio M. Di Nitto
0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2009-06-24 4:31 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commitdiff;h=d35a9f675801ba1926a98b1f074ee5445560fa91
Commit: d35a9f675801ba1926a98b1f074ee5445560fa91
Parent: 3032b147adf617ee204e4c837aeeed18e163969b
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate: Wed Jun 24 06:30:07 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Wed Jun 24 06:30:07 2009 +0200
fence manual: remove hardcoded use of /var
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
fence/agents/manual/Makefile.am | 8 ++++++
fence/agents/manual/fence_ack_manual | 37 -------------------------------
fence/agents/manual/fence_ack_manual.in | 37 +++++++++++++++++++++++++++++++
3 files changed, 45 insertions(+), 37 deletions(-)
diff --git a/fence/agents/manual/Makefile.am b/fence/agents/manual/Makefile.am
index b2552ab..c29b0ea 100644
--- a/fence/agents/manual/Makefile.am
+++ b/fence/agents/manual/Makefile.am
@@ -5,3 +5,11 @@ TARGET = fence_ack_manual
sbin_SCRIPTS = $(TARGET)
EXTRA_DIST = $(TARGET)
+
+$(TARGET): $(TARGET).in
+ cat $^ | sed \
+ -e 's#@clustervarrun@#${CLUSTERVARRUN}#g' \
+ > $@
+
+clean-local:
+ rm -f $(TARGET)
diff --git a/fence/agents/manual/fence_ack_manual b/fence/agents/manual/fence_ack_manual
deleted file mode 100644
index 83102aa..0000000
--- a/fence/agents/manual/fence_ack_manual
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-#
-# Manual override after fencing has failed.
-#
-
-if [ "$1" = "-n" ]; then
- shift
-fi
-
-if [ -z "$1" ] || [ "$1" = "-h" ]; then
- echo "usage:"
- echo " $0 <nodename>"
- echo " $0 -n <nodename>"
- echo
- echo "The -n flag exists to preserve compatibility with previous "
- echo "releases of $0, and is no longer required."
- exit 1
-fi
-
-declare answer
-
-echo "About to override fencing for $1."
-echo "Improper use of this command can cause severe file system damage."
-echo
-read -p "Continue [NO/absolutely]? " answer
-
-if [ "$answer" != "absolutely" ]; then
- echo "Aborted."
- exit 1
-fi
-
-while ! [ -e /var/run/cluster/fenced_override ]; do
- sleep 1
-done
-
-echo $1>/var/run/cluster/fenced_override
-echo Done
diff --git a/fence/agents/manual/fence_ack_manual.in b/fence/agents/manual/fence_ack_manual.in
new file mode 100644
index 0000000..69a0aa0
--- /dev/null
+++ b/fence/agents/manual/fence_ack_manual.in
@@ -0,0 +1,37 @@
+#!/bin/bash
+#
+# Manual override after fencing has failed.
+#
+
+if [ "$1" = "-n" ]; then
+ shift
+fi
+
+if [ -z "$1" ] || [ "$1" = "-h" ]; then
+ echo "usage:"
+ echo " $0 <nodename>"
+ echo " $0 -n <nodename>"
+ echo
+ echo "The -n flag exists to preserve compatibility with previous "
+ echo "releases of $0, and is no longer required."
+ exit 1
+fi
+
+declare answer
+
+echo "About to override fencing for $1."
+echo "Improper use of this command can cause severe file system damage."
+echo
+read -p "Continue [NO/absolutely]? " answer
+
+if [ "$answer" != "absolutely" ]; then
+ echo "Aborted."
+ exit 1
+fi
+
+while ! [ -e @clustervarrun@/fenced_override ]; do
+ sleep 1
+done
+
+echo $1>@clustervarrun@/fenced_override
+echo Done
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-24 4:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-24 4:31 fence-agents: master - fence manual: remove hardcoded use of /var Fabio M. Di Nitto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).