public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: "Fabio M. Di Nitto" <fabbione@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: fence-agents: master - fence manual: remove hardcoded use of /var
Date: Wed, 24 Jun 2009 04:31:00 -0000	[thread overview]
Message-ID: <20090624043037.96CC8120280@lists.fedorahosted.org> (raw)

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


                 reply	other threads:[~2009-06-24  4:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090624043037.96CC8120280@lists.fedorahosted.org \
    --to=fabbione@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).