From ced52304d00ae29d19a1cd90a34cd7213ad57ecf Mon Sep 17 00:00:00 2001
From: Mike Hibler <hibler@cs.utah.edu>
Date: Mon, 9 Sep 2013 15:36:21 -0600
Subject: [PATCH] Install the nodecheck scripts on a client or MFS install.

---
 clientside/tmcc/common/GNUmakefile.in  |  4 ++--
 clientside/tmcc/freebsd/GNUmakefile.in | 21 +++++++++++++++++++--
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/clientside/tmcc/common/GNUmakefile.in b/clientside/tmcc/common/GNUmakefile.in
index e12d6ac68c..a82a481769 100644
--- a/clientside/tmcc/common/GNUmakefile.in
+++ b/clientside/tmcc/common/GNUmakefile.in
@@ -93,7 +93,7 @@ nodecheck-install:	dir-install
 	$(INSTALL) -m 755 $(SRCDIR)/checknode/niccheck $(BINDIR)/niccheck
 	$(INSTALL) -m 755 $(SRCDIR)/checknode/timecheck $(BINDIR)/timecheck
 	$(INSTALL) -m 755 $(SRCDIR)/checknode/checknode $(BINDIR)/checknode
-	$(INSTALL) -m 755 $(SRCDIR)/checknode/rc.nodecheck $(BINDIR)/rc/
+	$(INSTALL) -m 755 $(SRCDIR)/checknode/rc.nodecheck $(RCDIR)/rc.nodecheck
 
 common-script-install:	dir-install
 	$(INSTALL) -m 755 $(SRCDIR)/libsetup.pm $(BINDIR)/libsetup.pm
@@ -147,7 +147,7 @@ symlinks:	dir-install
 	rm -f $(TBLIBDIR)
 	ln -s $(CLIENT_BINDIR) $(TBLIBDIR)
 
-local-script-install:	common-script-install
+local-script-install:	common-script-install nodecheck-install
 	$(INSTALL) -m 755 $(SRCDIR)/sendevent $(BINDIR)/sendevent
 	$(INSTALL) -m 755 $(SRCDIR)/rc.testbed $(RCDIR)/rc.testbed
 	$(INSTALL) -m 755 $(SRCDIR)/rc.bootsetup $(RCDIR)/rc.bootsetup
diff --git a/clientside/tmcc/freebsd/GNUmakefile.in b/clientside/tmcc/freebsd/GNUmakefile.in
index 012ae8cc9a..9a64efef98 100644
--- a/clientside/tmcc/freebsd/GNUmakefile.in
+++ b/clientside/tmcc/freebsd/GNUmakefile.in
@@ -51,6 +51,7 @@ ETCDIR		= $(DESTDIR)$(CLIENT_ETCDIR)
 BINDIR		= $(DESTDIR)$(CLIENT_BINDIR)
 VARDIR		= $(DESTDIR)$(CLIENT_VARDIR)
 RCDIR		= $(DESTDIR)/usr/local/etc/rc.d
+CSRCDIR		= $(SRCDIR)/../common
 ISMFS		= $(ETCDIR)/ismfs
 INSTALL		= /usr/bin/install -c
 
@@ -87,6 +88,22 @@ mfs-install:	destdircheck common-install etc-install \
 	    echo >$(ISMFS) "This file indicates its the MFS. DO NOT DELETE!"; \
 	fi
 
+#
+# Include this if you want to install the nodecheck scripts in the frisbee MFS
+# XXX duplicates common/GNUmakefile's nodecheck_install with different
+# SRCDIR and BINDIR.
+#
+frisbee-nodecheck-install: destdircheck
+	$(INSTALL) -m 644 $(CSRCDIR)/checknode/checkutils.sh $(SYSETCDIR)/testbed/
+	$(INSTALL) -m 644 $(CSRCDIR)/checknode/hbis.sh $(SYSETCDIR)/testbed/
+	$(INSTALL) -m 755 $(CSRCDIR)/checknode/cpucheck $(SYSETCDIR)/testbed/
+	$(INSTALL) -m 755 $(CSRCDIR)/checknode/diskcheck $(SYSETCDIR)/testbed/
+	$(INSTALL) -m 755 $(CSRCDIR)/checknode/memcheck $(SYSETCDIR)/testbed/
+	$(INSTALL) -m 755 $(CSRCDIR)/checknode/niccheck $(SYSETCDIR)/testbed/
+	$(INSTALL) -m 755 $(CSRCDIR)/checknode/timecheck $(SYSETCDIR)/testbed/
+	$(INSTALL) -m 755 $(CSRCDIR)/checknode/checknode $(SYSETCDIR)/testbed/
+	$(INSTALL) -m 755 $(CSRCDIR)/checknode/rc.nodecheck $(SYSETCDIR)/testbed/
+
 #
 # XXX butt-uglies live here:
 #   - hardwire /etc/testbed instead of $(ETCDIR)
@@ -94,7 +111,7 @@ mfs-install:	destdircheck common-install etc-install \
 #     root's shell as sh instead of csh, we just link sh to csh in the MFS.
 #   - no ismfs file since we don't run any perl scripts that need it
 #
-frisbee-mfs-install:	destdircheck
+frisbee-mfs-install:	destdircheck frisbee-nodecheck-install
 	$(INSTALL) -m 644 $(SRCDIR)/frisbee/rc.conf $(SYSETCDIR)/rc.conf
 	$(INSTALL) -m 644 $(SRCDIR)/frisbee/rc.local $(SYSETCDIR)/rc.local
 	$(INSTALL) -m 755 $(SRCDIR)/dhclient-exit-hooks \
@@ -116,7 +133,7 @@ frisbee-mfs-install:	destdircheck
 	$(INSTALL) -m 755 $(SRCDIR)/rc.frisbee $(SYSETCDIR)/testbed
 	$(INSTALL) -m 755 $(SRCDIR)/rc.ipod $(SYSETCDIR)/testbed
 	$(INSTALL) -m 755 $(SRCDIR)/slicefix $(SYSETCDIR)/testbed
-	$(INSTALL) -m 755 $(SRCDIR)/../common/localize_image $(SYSETCDIR)/testbed
+	$(INSTALL) -m 755 $(CSRCDIR)/localize_image $(SYSETCDIR)/testbed
 	$(INSTALL) -m 755 $(SRCDIR)/camwce $(SYSETCDIR)/testbed
 	$(INSTALL) -m 755 -s ../tmcc-nossl $(SYSETCDIR)/testbed/tmcc
 	$(INSTALL) -m 755 -s ../findif $(SYSETCDIR)/testbed
-- 
GitLab