? make/defines.mk
Index: configure
===================================================================
RCS file: /cvs/cluster/cluster/configure,v
retrieving revision 1.29
diff -u -r1.29 configure
--- configure	6 Sep 2007 16:26:47 -0000	1.29
+++ configure	7 Sep 2007 05:13:05 -0000
@@ -49,6 +49,7 @@
 	readlinelibdir => \$readlinelibdir,
 	openaisincdir => \$openaisincdir,
 	openaislibdir => \$openaislibdir,
+	aisexecbin => \$aisexecbin,
 	virtincdir => \$virtincdir,
 	virtlibdir => \$virtlibdir,
 	nssincdir => \$nssincdir,
@@ -94,6 +95,7 @@
 		    'readlinelibdir=s',
 		    'openaisincdir=s',
 		    'openaislibdir=s',
+		    'aisexecbin=s',
 		    'virtincdir=s',
 		    'virtlibdir=s',
 		    'nssincdir=s',
@@ -124,12 +126,12 @@
   print "Usage: $_ [flags]\n";
   print "--help\t\tPrints this usage information\n\n";
   print "install flags:\n";
-  print "--prefix=\tthe base directory to install into.  (Default: /)\n";
+  print "--prefix=\tthe base directory to install into.  (Default: /usr)\n";
   print "--sbindir=\tthe base directory for system binaries.  (Default: {prefix}/sbin)\n";
-  print "--libdir=\tthe base directory for libraries.  (Default: {prefix}/usr/lib)\n";
-  print "--libexecdir=\tthe base directory for executable components.  (Default: {prefix}/usr/libexec)\n";
-  print "--sharedir=\tthe base directory for misc cluster files.  (Default: {prefix}/usr/share/cluster)\n";
-  print "--mandir=\tthe base directory for man pages.  (Default:  {prefix}/usr/share/man)\n";
+  print "--libdir=\tthe base directory for libraries.  (Default: {prefix}/lib)\n";
+  print "--libexecdir=\tthe base directory for executable components.  (Default: {prefix}/libexec)\n";
+  print "--sharedir=\tthe base directory for misc cluster files.  (Default: {prefix}/share/cluster)\n";
+  print "--mandir=\tthe base directory for man pages.  (Default: {prefix}/share/man)\n";
   print "--module_dir=\tthe base directory for kernel modules.  (Default:  /lib/modules/`uname -r`/kernel\n";
   print "\nbuild flags:\n";
   print "--cc=\t\tcompiler to use.  (Default: gcc)\n";
@@ -139,7 +141,7 @@
   print "--ldflags=\toverride default LDFLAGS settings.  (Default: none)\n";
   print "--extraldflags=\tadd extra linking options to default LDFLAGS settings.  (Default: none)\n";
   print "--kernel_src=\tthe directory containing the kernel source you wish to\n\t\tcompile against. (Default: /lib/modules/`uname -r`/build)\n";
-  print "--incdir=\tthe base directory for include files.  (Default: {prefix}/usr/include)\n";
+  print "--incdir=\tthe base directory for include files.  (Default: {prefix}/include)\n";
   print "--ccsincdir=\tthe base directory for ccs include files.  (Default: ./ccs/lib)\n";
   print "--ccslibdir=\tthe base directory for ccs libraries.  (Default: ./ccs/lib)\n";
   print "--cmanincdir=\tthe base directory for cman include files.  (Default: ./cman/lib)\n";
@@ -154,6 +156,7 @@
   print "--readlinelibdir=\tthe base directory for readline libraries.  (Default: {libdir})\n";
   print "--openaisincdir=\tthe base directory for openais include files.  (Default: {incdir})\n";
   print "--openaislibdir=\tthe base directory for openais libraries.  (Default: {libdir}/openais)\n";
+  print "--aisexecbin=\tlocation of aisexec executable file.  (Default: /usr/sbin/aisexec)\n";
   print "--nssincdir=\tthe base directory for libnss include files.  (Default: {incdir}/nss3)\n";
   print "--nsslibdir=\tthe base directory for libnss libraries.  (Default: {libdir})\n";
   print "--nsprincdir=\tthe base directory for libnspr include files.  (Default: {incdir}/nspr4)\n";
@@ -189,6 +192,9 @@
 if ($extraldflags) {
   $ldflags="${ldflags} ${extraldflags}";
 }
+if (!$prefix) {
+  $prefix="/usr";
+}
 if (!$kernel_src) {
   $kernel_src="/lib/modules/`uname -r`/build";
 }
@@ -202,10 +208,10 @@
   $gnbdkincdir="${pwd}/gnbd-kernel/src";
 }
 if (!$incdir) {
-  $incdir="${prefix}/usr/include";
+  $incdir="${prefix}/include";
 }
 if (!$libdir) {
-  $libdir="${prefix}/usr/lib";
+  $libdir="${prefix}/lib";
 }
 if (!$ccsincdir) {
   $ccsincdir="${pwd}/ccs/lib";
@@ -249,6 +255,9 @@
 if (!$openaislibdir) {
   $openaislibdir="${libdir}/openais";
 }
+if (!$aisexecbin) {
+  $aisexecbin="/usr/sbin/aisexec";
+}
 if (!$nssincdir) {
   $nssincdir="${incdir}/nss3";
 }
@@ -274,16 +283,16 @@
   $xenlibdir="${libdir}";
 }
 if (!$libexecdir) {
-  $libexecdir="${prefix}/usr/libexec";
+  $libexecdir="${prefix}/libexec";
 }
 if (!$mandir) {
-  $mandir="${prefix}/usr/share/man";
+  $mandir="${prefix}/share/man";
 }
 if (!$sbindir) {
   $sbindir="${prefix}/sbin";
 }
 if (!$sharedir) {
-  $sharedir="${prefix}/usr/share/cluster";
+  $sharedir="${prefix}/share/cluster";
 }
 
 @args = "find fence/agents -mindepth 2 -maxdepth 2 -name Makefile -printf '%h'";
@@ -337,6 +346,7 @@
   $_ =~ s/\@NCURSESLIBDIR\@/$ncurseslibdir/;
   $_ =~ s/\@OPENAISINCDIR\@/$openaisincdir/;
   $_ =~ s/\@OPENAISLIBDIR\@/$openaislibdir/;
+  $_ =~ s/\@AISEXECBIN\@/$aisexecbin/;
   $_ =~ s/\@XENINCDIR\@/$xenincdir/;
   $_ =~ s/\@XENLIBDIR\@/$xenlibdir/;
   $_ =~ s/\@NSSINCDIR\@/$nssincdir/;
Index: cman/cman_tool/Makefile
===================================================================
RCS file: /cvs/cluster/cluster/cman/cman_tool/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- cman/cman_tool/Makefile	28 Aug 2007 04:35:39 -0000	1.24
+++ cman/cman_tool/Makefile	7 Sep 2007 05:13:05 -0000
@@ -17,7 +17,7 @@
 OBJS=	main.o \
 	join.o
 
-CFLAGS += -DSBINDIR=\"${sbindir}\"
+CFLAGS += -DAISEXECBIN=\"${aisexecbin}\"
 CFLAGS += -I${ccsincdir} -I${cmanincdir}
 CFLAGS += -I${incdir}
 
Index: cman/cman_tool/join.c
===================================================================
RCS file: /cvs/cluster/cluster/cman/cman_tool/join.c,v
retrieving revision 1.50
diff -u -r1.50 join.c
--- cman/cman_tool/join.c	19 Feb 2007 13:10:24 -0000	1.50
+++ cman/cman_tool/join.c	7 Sep 2007 05:13:05 -0000
@@ -137,11 +137,10 @@
 	case 0: // child
 		close(p[0]);
 		be_daemon(!comline->verbose);
-		chdir(SBINDIR);
-		execve("./aisexec", argv, envp);
+		execve(AISEXECBIN, argv, envp);
 
 		// exec failed - tell the parent process */
-		sprintf(scratch, "execve of " SBINDIR "/aisexec failed: %s", strerror(errno));
+		sprintf(scratch, "execve of " AISEXECBIN " failed: %s", strerror(errno));
 		write(p[1], scratch, strlen(scratch));
 		exit(1);
 		break;
Index: make/defines.mk.input
===================================================================
RCS file: /cvs/cluster/cluster/make/defines.mk.input,v
retrieving revision 1.2
diff -u -r1.2 defines.mk.input
--- make/defines.mk.input	2 May 2007 12:39:35 -0000	1.2
+++ make/defines.mk.input	7 Sep 2007 05:13:06 -0000
@@ -55,6 +55,7 @@
 nsprlibdir ?= @NSPRLIBDIR@
 openaisincdir ?= @OPENAISINCDIR@
 openaislibdir ?= @OPENAISLIBDIR@
+aisexecbin ?= @AISEXECBIN@
 xenincdir ?= @XENINCDIR@
 xenlibdir ?= @XENLIBDIR@
 virtincdir ?= @VIRTINCDIR@
