From de6cbd30afe4394cf9245f1de27f8628fe4c726c Mon Sep 17 00:00:00 2001
From: Russ Fish <fish@flux.utah.edu>
Date: Mon, 18 Oct 2004 17:15:14 +0000
Subject: [PATCH] Add SWAPPER= to the end of the CREATOR= value returned from
 "creator".  . Bump the tmcd version to 21, since this induces an
 incompatibility.  . Fix the $ anchored CREATOR= pattern in
 common/config/rc.misc that    forced the version bump.

---
 tmcd/common/config/rc.misc | 2 +-
 tmcd/common/libsetup.pm    | 2 +-
 tmcd/decls.h               | 2 +-
 tmcd/tmcd.c                | 8 +++++++-
 4 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/tmcd/common/config/rc.misc b/tmcd/common/config/rc.misc
index 3cc062b5c1..3d0c5e8879 100755
--- a/tmcd/common/config/rc.misc
+++ b/tmcd/common/config/rc.misc
@@ -168,7 +168,7 @@ sub docreator()
     #
     # There should be just one string. Ignore anything else.
     #
-    if ($tmccresults[0] =~ /^CREATOR=([-\w]*)$/) {
+    if ($tmccresults[0] =~ /^CREATOR=([-\w]*)/) {
 	$creator = $1;
     }
     else {
diff --git a/tmcd/common/libsetup.pm b/tmcd/common/libsetup.pm
index 214cd8d248..cdb6b9c110 100644
--- a/tmcd/common/libsetup.pm
+++ b/tmcd/common/libsetup.pm
@@ -44,7 +44,7 @@ use libtmcc;
 #
 # BE SURE TO BUMP THIS AS INCOMPATIBILE CHANGES TO TMCD ARE MADE!
 #
-sub TMCD_VERSION()	{ 20; };
+sub TMCD_VERSION()	{ 21; };
 libtmcc::configtmcc("version", TMCD_VERSION());
 
 # Control tmcc timeout.
diff --git a/tmcd/decls.h b/tmcd/decls.h
index 0ff3f3b0d4..662596e397 100644
--- a/tmcd/decls.h
+++ b/tmcd/decls.h
@@ -25,4 +25,4 @@
  * NB: See ron/libsetup.pm. That is version 4! I'll merge that in. 
  */
 #define DEFAULT_VERSION		2
-#define CURRENT_VERSION		20
+#define CURRENT_VERSION		21
diff --git a/tmcd/tmcd.c b/tmcd/tmcd.c
index 7f03ec717f..f790feb247 100644
--- a/tmcd/tmcd.c
+++ b/tmcd/tmcd.c
@@ -3479,7 +3479,13 @@ COMMAND_PROTOTYPE(docreator)
 {
 	char		buf[MYBUFSIZE];
 
-	OUTPUT(buf, sizeof(buf), "CREATOR=%s\n", reqp->creator);
+	/* There was a $ anchored CREATOR= pattern in common/config/rc.misc . */
+	if (vers<=20)
+		OUTPUT(buf, sizeof(buf), "CREATOR=%s\n", reqp->creator);
+	else
+		OUTPUT(buf, sizeof(buf), "CREATOR=%s SWAPPER=%s\n", 
+		       reqp->creator, reqp->swapper);
+
 	client_writeback(sock, buf, strlen(buf), tcp);
 	if (verbose)
 		info("CREATOR: %s", buf);
-- 
GitLab