diff --git a/NEWS b/NEWS
index 44bf3b02b643d0b51598586cdafcc39bdf6c9824..4395c6644f4d141b815c46210e4940739b5f2b16 100644
--- a/NEWS
+++ b/NEWS
@@ -45,6 +45,7 @@ documents those changes that are of interest to users and admins.
  -- Tweak slurmctld's node ping logic to better handle failed nodes with 
     hierarchical communications fail-over logic.
  -- Add support for sched/wiki specific configuration file "wiki.conf".
+ -- Added sched/wiki2 plugin (new experimental wiki plugin).
  
 * Changes in SLURM 1.1.9
 ========================
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index 731d53d0585de8b64d9bab512440d23ce4778690..6c0aeb659fafd840300722a6d15d83a6b1b4161e 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -1,5 +1,6 @@
 RELEASE NOTES FOR SLURM VERSION 1.2
-20 July 2006
+30 August 2006
+
 See the file NEWS for more details.
 
 * Several new commands have been added to perform the individual srun functions.
@@ -20,3 +21,19 @@ See the file NEWS for more details.
   code).
 
 * Added support for OS X operaing system.
+
+* There is a new version of the Wiki scheduler plugin to interface with
+  the Maui Scheduler and Moab. It can be accessed with the slurm.conf
+  parameter "SchedulerType=sched/wiki2" (it will replace "sched/wiki"
+  in SLURM version 1.2, but will co-exist in version 1.1.10+). Key
+  differences include:
+  - Node and job data returned is correct (several errors in old plugin)
+  - Node data includes partition information (CCLASS field)
+  - Improved error handling
+  - Support added for configuration file ("wiki.conf" in same directory
+    as "slurm.conf" file, see "man wiki.conf" for details)
+  - Support added for job suspend/resume
+  - Authentication of communcations now supported
+  - Improved performance
+  - Memory leaks fixed
+
diff --git a/configure b/configure
index 565334331498ab6d1c5ae5082441a8ca68c7fd77..215c2927789fa57f8a24a80a60f2c72a1750433d 100755
--- a/configure
+++ b/configure
@@ -25568,7 +25568,7 @@ _ACEOF
 
 
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile src/Makefile src/api/Makefile src/common/Makefile src/sacct/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/srun/Makefile src/slaunch/Makefile src/slurmd/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/jobacct/Makefile src/plugins/jobacct/linux/Makefile src/plugins/jobacct/aix/Makefile src/plugins/jobacct/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/rms/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/maui/Makefile src/plugins/sched/maui/wiki/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/block_allocator/Makefile src/plugins/select/bluegene/plugin/Makefile src/plugins/select/linear/Makefile src/plugins/select/cons_res/Makefile src/plugins/switch/Makefile src/plugins/switch/elan/Makefile src/plugins/switch/none/Makefile src/plugins/switch/federation/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/none/Makefile doc/Makefile doc/man/Makefile doc/html/Makefile testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/common/Makefile testsuite/slurm_unit/slurmctld/Makefile testsuite/slurm_unit/slurmd/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile"
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile src/Makefile src/api/Makefile src/common/Makefile src/sacct/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/srun/Makefile src/slaunch/Makefile src/slurmd/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/jobacct/Makefile src/plugins/jobacct/linux/Makefile src/plugins/jobacct/aix/Makefile src/plugins/jobacct/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/rms/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/maui/Makefile src/plugins/sched/maui/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/block_allocator/Makefile src/plugins/select/bluegene/plugin/Makefile src/plugins/select/linear/Makefile src/plugins/select/cons_res/Makefile src/plugins/switch/Makefile src/plugins/switch/elan/Makefile src/plugins/switch/none/Makefile src/plugins/switch/federation/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/none/Makefile doc/Makefile doc/man/Makefile doc/html/Makefile testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/common/Makefile testsuite/slurm_unit/slurmctld/Makefile testsuite/slurm_unit/slurmd/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile"
 
 
 cat >confcache <<\_ACEOF
@@ -26297,6 +26297,7 @@ do
   "src/plugins/sched/hold/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/plugins/sched/hold/Makefile" ;;
   "src/plugins/sched/maui/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/plugins/sched/maui/Makefile" ;;
   "src/plugins/sched/maui/wiki/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/plugins/sched/maui/wiki/Makefile" ;;
+  "src/plugins/sched/wiki2/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/plugins/sched/wiki2/Makefile" ;;
   "src/plugins/select/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/plugins/select/Makefile" ;;
   "src/plugins/select/bluegene/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/plugins/select/bluegene/Makefile" ;;
   "src/plugins/select/bluegene/block_allocator/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/plugins/select/bluegene/block_allocator/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 53919c2e0d43f7991f39df1a3a6a4bd139e725dd..86ba4c1e8231201a4e770a2aa8a3c1a8f2317146 100644
--- a/configure.ac
+++ b/configure.ac
@@ -271,6 +271,7 @@ AC_CONFIG_FILES([Makefile
 		 src/plugins/sched/hold/Makefile
 		 src/plugins/sched/maui/Makefile
 		 src/plugins/sched/maui/wiki/Makefile
+		 src/plugins/sched/wiki2/Makefile
 		 src/plugins/select/Makefile
 		 src/plugins/select/bluegene/Makefile
 		 src/plugins/select/bluegene/block_allocator/Makefile
diff --git a/doc/html/moab.shtml b/doc/html/moab.shtml
index 5128cd29ab135cdbf367cab8d2c00a6aae33be1f..1f8e18f6e4dd3722824478645516e741410d826c 100644
--- a/doc/html/moab.shtml
+++ b/doc/html/moab.shtml
@@ -13,47 +13,67 @@ http://www.clusterresources.com/pages/resources/documentation/grid/admin.php</a>
 <p>First, download the Moab scheduler kit from their web site
 <a href="http://www.clusterresources.com/pages/products/moab-cluster-suite.php">
 http://www.clusterresources.com/pages/products/moab-cluster-suite.php</a>. 
-Note: Moab version 4.5.0 or higher and SLURM version 0.6.10 or higher.</p>
+Note: Moab version 4.5.0 or higher and SLURM version 1.1.10 or higher.</p>
 
 <h3>SLURM configuration</h3>
 <p>Set the <i>slurm.conf</i> scheduler parameters as follows:
 <pre>
-SchedulerType=sched/wiki
+SchedulerType=sched/wiki2   (NOTE: "sched/wiki" in slurm version 1.2)
 SchedulerPort=7321
 </pre>
 Running multiple jobs per mode can be accomplished using the
 <i>SelectType=select/cons_res</i> and/or specifying 
 <i>Shared=yes</i> on selected partitions.</p>
 
+<p>The wiki-specific configuration is stored in a file 
+specific to the wiki-plugin. This file should be protected 
+from reading by users. It only needs to be readable by 
+<i>SlurmUser</i> (as configured in <i>slurm.conf</i>) and 
+only needs to exist on computers where the <i>slurmctld</i>
+daemon executes.</p>
+
 <p>SLURM can either place all newly arriving jobs in a HELD state 
 (priority = 0) and let Moab decide when and where to run the jobs 
 or SLURM can control when and where to run jobs. 
 In the later case, Moab can modify the priorities of 
-pending jobs to re-order the job queue. 
+pending jobs to re-order the job queue or just monitor system state. 
 The mode of operation is controlled by a wiki-plugin 
 specific configuration file. 
 The name of this file is <i>wiki.conf</i> and it will be 
-in the same directory as the slurm.conf file. 
-The (one) currently supported keyword is <i>JobPriority</i>
-which can be given a value of "run" or "hold".
-The default value is "hold".
-Here is a sample wiki.conf file
+in the same directory as the <i>slurm.conf</i> file.</p>
+ 
+<p>The currently supported keywords include:<br>
+<i>JobPriority</i>, which can be given a value of "run" or 
+"hold" with a default value of "hold";<br>
+<i>AuthKey</i> which contains a numeric value that should 
+match the <i>KEY</i> parameter in the <i>moab-private.cfg</i>
+file.</p>
+
+<p>Here is a sample <i>wiki.conf</i> file
 <pre>
 # wiki.conf
 # SLURM's wiki plugin configuration file
-# Have SLURM control job scheduling, Moab just monitoring
-JobPriority=run
+#
+# Matches KEY in moab-private.cfg
+AuthKey=1234
+#
+# Have Moab control job scheduling
+JobPriority=hold
 </pre>
 </p>
 
 <h3>Moab Configuration</h3>
 
 <p>Moab has support for SLURM's WIKI interface by default.
-Specify this interface in the moab.cfg file as follows:
+Specify this interface in the <i>moab.cfg</i> file as follows:
 <pre>
-RMCFG[slurm]         TYPE=wiki:slurm AUTHTYPE=NONE
+RMCFG[slurm]         TYPE=wiki:slurm AUTHTYPE=CHECKSUM
 </pre>
-</p>
+In <i>moab-private.cfg</i> specify the private key as follows:
+<pre>
+KEY=1234
+</pre>
+Insure that this file is protected from viewing by users. </p>
 
 <p class="footer"><a href="#top">top</a></p>
 
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index de6360f06093f696dba3d07b148fb1bc8da9aac5..a9c8ddf963f116a56414b77a81be9ad01f9e7463 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -85,7 +85,8 @@ man3_MANS = man3/slurm_hostlist_create.3 \
 	man3/slurm_update_partition.3
 
 man5_MANS = man5/bluegene.conf.5 \
-	man5/slurm.conf.5
+	man5/slurm.conf.5 \
+	man5/wiki.conf.5
 
 man8_MANS = man8/slurmctld.8 \
 	man8/slurmd.8 \
diff --git a/doc/man/Makefile.in b/doc/man/Makefile.in
index c1a0b0dc3d44cf715bd7e04c51eaef5cb63218dc..41ef59610c14fd87e2782725a2e19e108670f6be 100644
--- a/doc/man/Makefile.in
+++ b/doc/man/Makefile.in
@@ -337,7 +337,8 @@ man3_MANS = man3/slurm_hostlist_create.3 \
 	man3/slurm_update_partition.3
 
 man5_MANS = man5/bluegene.conf.5 \
-	man5/slurm.conf.5
+	man5/slurm.conf.5 \
+	man5/wiki.conf.5
 
 man8_MANS = man8/slurmctld.8 \
 	man8/slurmd.8 \
diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1
index 402d3695672707e2c34588c55cea55f3e4790ada..e160f26ca1bd79b037133197095d8872a35d7bfc 100644
--- a/doc/man/man1/srun.1
+++ b/doc/man/man1/srun.1
@@ -639,7 +639,7 @@ applicable to other systems as well.
 Specify the geometry requirements for the job. The three numbers 
 represent the required geometry giving dimensions in the X, Y and 
 Z directions. For example "\-\-geometry=2x3x4", specifies a block 
-of nodes having 2 x 3 x 4 = 24 nodes (actually base partions on 
+of nodes having 2 x 3 x 4 = 24 nodes (actually base partitions on 
 Blue Gene).
 .TP
 \fB\-\-conn\-type\fR=\fItype\fR
diff --git a/doc/man/man5/bluegene.conf.5 b/doc/man/man5/bluegene.conf.5
index 91934ce62afc147b17ce4f49a1204fe6d5df936e..e5661e5ec9fe03e4dc244a6328150337f26fd9f7 100644
--- a/doc/man/man5/bluegene.conf.5
+++ b/doc/man/man5/bluegene.conf.5
@@ -2,7 +2,7 @@
 .SH "NAME"
 bluegene.conf \- Slurm configuration file for BlueGene systems 
 .SH "DESCRIPTION"
-\fB/etc/bluegene.conf\fP is an ASCI file which describes BlueGene specific 
+\fB/etc/bluegene.conf\fP is an ASCII file which describes BlueGene specific 
 SLURM configuration information. This includes specifications for bgblock 
 layout, configuration, logging, etc.
 .LP
diff --git a/slurm.spec b/slurm.spec
index 4a7eee9323b75c41ff79fda2249373ef5f002197..0c1684fa4ed7761f4acf25ee5b4f379ed9845741 100644
--- a/slurm.spec
+++ b/slurm.spec
@@ -13,8 +13,7 @@ Group: System Environment/Base
 Source: %{name}-%{version}-%{release}.tgz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
 URL: http://www.llnl.gov/linux/slurm
-Requires: openssl >= 0.9.6
-BuildRequires: openssl-devel >= 0.96
+BuildRequires: openssl-devel >= 0.9.6
 
 #
 # If "--with debug" is set compile with --enable-debug 
@@ -180,6 +179,12 @@ for plugin in auth_munge auth_authd sched_wiki; do
      echo %{_libdir}/slurm/${plugin}.so > $LIST
 done
 
+# Temporary, until wiki2 becomes wiki (see code above)
+LIST=./sched_wiki.files
+test -f $RPM_BUILD_ROOT/%{_libdir}/slurm/sched_wiki.so &&
+  echo %{_libdir}/slurm/sched_wiki2.so            >> $LIST
+echo "%{_mandir}/man5/wiki.*"                     >> $LIST
+
 LIST=./switch_elan.files
 touch $LIST
 test -f $RPM_BUILD_ROOT/%{_libdir}/slurm/switch_elan.so &&
diff --git a/src/api/Makefile.am b/src/api/Makefile.am
index 85339aaea74efec2754ebce6a1035957ed373bd5..5bbe193a15f808680bff4e6db0d520c529de8ffe 100644
--- a/src/api/Makefile.am
+++ b/src/api/Makefile.am
@@ -89,7 +89,7 @@ slurmapi_add = 				\
 libslurm_la_LIBADD = $(slurmapi_add)
 libslurmhelper_la_LIBADD = $(slurmapi_add)
 
-libpmi_la_LIBADD	= libslurm.la 
+libpmi_la_LIBADD	= $(top_builddir)/src/api/libslurm.la
 
 libslurm_la_LDFLAGS        = \
 	$(LIB_LDFLAGS)       \
diff --git a/src/api/Makefile.in b/src/api/Makefile.in
index 90d2203b1dd37c272357974298203d8073821479..eba74b688aeb918a6fe0a4a8f5e4709bf815a9c1 100644
--- a/src/api/Makefile.in
+++ b/src/api/Makefile.in
@@ -78,7 +78,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
 am__installdirs = "$(DESTDIR)$(libdir)"
 libLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
-libpmi_la_DEPENDENCIES = libslurm.la
+libpmi_la_DEPENDENCIES = $(top_builddir)/src/api/libslurm.la
 am_libpmi_la_OBJECTS = pmi.lo
 libpmi_la_OBJECTS = $(am_libpmi_la_OBJECTS)
 am__DEPENDENCIES_1 = $(common_dir)/libcommon.la \
@@ -372,7 +372,7 @@ slurmapi_add = \
 
 libslurm_la_LIBADD = $(slurmapi_add)
 libslurmhelper_la_LIBADD = $(slurmapi_add)
-libpmi_la_LIBADD = libslurm.la 
+libpmi_la_LIBADD = $(top_builddir)/src/api/libslurm.la
 libslurm_la_LDFLAGS = \
 	$(LIB_LDFLAGS)       \
 	-version-info $(current):$(rev):$(age) \
diff --git a/src/plugins/sched/Makefile.am b/src/plugins/sched/Makefile.am
index 81405b43e8d3f5fdbe8c58687383b31df460b04b..2276a58a7e728065ceb247c2637f398e92abc149 100644
--- a/src/plugins/sched/Makefile.am
+++ b/src/plugins/sched/Makefile.am
@@ -1,3 +1,3 @@
 # Makefile for scheduler plugins
 
-SUBDIRS = backfill builtin hold maui
+SUBDIRS = backfill builtin hold maui wiki2
diff --git a/src/plugins/sched/Makefile.in b/src/plugins/sched/Makefile.in
index 8487bfe8d0ac0655dcfb75a7be9a330fab486449..1a605bb421e97df3e38c64e106dc434042f63be2 100644
--- a/src/plugins/sched/Makefile.in
+++ b/src/plugins/sched/Makefile.in
@@ -255,7 +255,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
-SUBDIRS = backfill builtin hold maui
+SUBDIRS = backfill builtin hold maui wiki2
 all: all-recursive
 
 .SUFFIXES:
diff --git a/src/plugins/sched/wiki2/Makefile.am b/src/plugins/sched/wiki2/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..2c05dd18b44a1b0373203a74b7b9cee9ee2596d6
--- /dev/null
+++ b/src/plugins/sched/wiki2/Makefile.am
@@ -0,0 +1,27 @@
+# Makefile for wiki scheduler plugin
+
+AUTOMAKE_OPTIONS = foreign
+
+CXXFLAGS = -fexceptions
+
+PLUGIN_FLAGS = -module -avoid-version --export-dynamic 
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+
+pkglib_LTLIBRARIES = sched_wiki2.la
+
+sched_wiki2_la_SOURCES = \
+	cancel_job.c	\
+	crypto.c	\
+	crypto.h	\
+	get_jobs.c	\
+	get_nodes.c	\
+	job_add_task.c	\
+	job_release_task.c \
+	msg.c		\
+	msg.h		\
+	resume_job.c	\
+	sched_wiki.c	\
+	start_job.c	\
+	suspend_job.c
+sched_wiki2_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS)
diff --git a/src/plugins/sched/wiki2/Makefile.in b/src/plugins/sched/wiki2/Makefile.in
new file mode 100644
index 0000000000000000000000000000000000000000..e66dbfb45a08a32bed3dc8b5436c96145d65f704
--- /dev/null
+++ b/src/plugins/sched/wiki2/Makefile.in
@@ -0,0 +1,583 @@
+# Makefile.in generated by automake 1.9 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Makefile for wiki scheduler plugin
+
+SOURCES = $(sched_wiki2_la_SOURCES)
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+subdir = src/plugins/sched/wiki2
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \
+	$(top_srcdir)/auxdir/slurm.m4 \
+	$(top_srcdir)/auxdir/x_ac__system_configuration.m4 \
+	$(top_srcdir)/auxdir/x_ac_affinity.m4 \
+	$(top_srcdir)/auxdir/x_ac_aix.m4 \
+	$(top_srcdir)/auxdir/x_ac_bluegene.m4 \
+	$(top_srcdir)/auxdir/x_ac_debug.m4 \
+	$(top_srcdir)/auxdir/x_ac_elan.m4 \
+	$(top_srcdir)/auxdir/x_ac_federation.m4 \
+	$(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \
+	$(top_srcdir)/auxdir/x_ac_gtk.m4 \
+	$(top_srcdir)/auxdir/x_ac_munge.m4 \
+	$(top_srcdir)/auxdir/x_ac_ncurses.m4 \
+	$(top_srcdir)/auxdir/x_ac_pam.m4 \
+	$(top_srcdir)/auxdir/x_ac_ptrace.m4 \
+	$(top_srcdir)/auxdir/x_ac_readline.m4 \
+	$(top_srcdir)/auxdir/x_ac_setpgrp.m4 \
+	$(top_srcdir)/auxdir/x_ac_setproctitle.m4 \
+	$(top_srcdir)/auxdir/x_ac_sgi_job.m4 \
+	$(top_srcdir)/auxdir/x_ac_slurm_ssl.m4 \
+	$(top_srcdir)/auxdir/x_ac_xcpu.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/slurm/slurm.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(pkglibdir)"
+pkglibLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(pkglib_LTLIBRARIES)
+sched_wiki2_la_LIBADD =
+am_sched_wiki2_la_OBJECTS = cancel_job.lo crypto.lo get_jobs.lo \
+	get_nodes.lo job_add_task.lo job_release_task.lo msg.lo \
+	resume_job.lo sched_wiki.lo start_job.lo suspend_job.lo
+sched_wiki2_la_OBJECTS = $(am_sched_wiki2_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/slurm
+depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(sched_wiki2_la_SOURCES)
+DIST_SOURCES = $(sched_wiki2_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTHD_CFLAGS = @AUTHD_CFLAGS@
+AUTHD_LIBS = @AUTHD_LIBS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BG_INCLUDES = @BG_INCLUDES@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CMD_LDFLAGS = @CMD_LDFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = -fexceptions
+CYGPATH_W = @CYGPATH_W@
+DEBUG_MODULES_FALSE = @DEBUG_MODULES_FALSE@
+DEBUG_MODULES_TRUE = @DEBUG_MODULES_TRUE@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ELAN_LIBS = @ELAN_LIBS@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@
+FFLAGS = @FFLAGS@
+GTK2_CFLAGS = @GTK2_CFLAGS@
+GTK2_LIBS = @GTK2_LIBS@
+HAVEPKGCONFIG = @HAVEPKGCONFIG@
+HAVE_AIX = @HAVE_AIX@
+HAVE_AIX_FALSE = @HAVE_AIX_FALSE@
+HAVE_AIX_PROCTRACK_FALSE = @HAVE_AIX_PROCTRACK_FALSE@
+HAVE_AIX_PROCTRACK_TRUE = @HAVE_AIX_PROCTRACK_TRUE@
+HAVE_AIX_TRUE = @HAVE_AIX_TRUE@
+HAVE_ELAN = @HAVE_ELAN@
+HAVE_ELAN_FALSE = @HAVE_ELAN_FALSE@
+HAVE_ELAN_TRUE = @HAVE_ELAN_TRUE@
+HAVE_FEDERATION = @HAVE_FEDERATION@
+HAVE_FEDERATION_FALSE = @HAVE_FEDERATION_FALSE@
+HAVE_FEDERATION_TRUE = @HAVE_FEDERATION_TRUE@
+HAVE_GTK_FALSE = @HAVE_GTK_FALSE@
+HAVE_GTK_TRUE = @HAVE_GTK_TRUE@
+HAVE_NUMA_FALSE = @HAVE_NUMA_FALSE@
+HAVE_NUMA_TRUE = @HAVE_NUMA_TRUE@
+HAVE_PAM_FALSE = @HAVE_PAM_FALSE@
+HAVE_PAM_TRUE = @HAVE_PAM_TRUE@
+HAVE_SCHED_SETAFFINITY_FALSE = @HAVE_SCHED_SETAFFINITY_FALSE@
+HAVE_SCHED_SETAFFINITY_TRUE = @HAVE_SCHED_SETAFFINITY_TRUE@
+HAVE_SGI_JOB_FALSE = @HAVE_SGI_JOB_FALSE@
+HAVE_SGI_JOB_TRUE = @HAVE_SGI_JOB_TRUE@
+HAVE_SOME_CURSES = @HAVE_SOME_CURSES@
+HAVE_SOME_CURSES_FALSE = @HAVE_SOME_CURSES_FALSE@
+HAVE_SOME_CURSES_TRUE = @HAVE_SOME_CURSES_TRUE@
+HAVE_UNSETENV_FALSE = @HAVE_UNSETENV_FALSE@
+HAVE_UNSETENV_TRUE = @HAVE_UNSETENV_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_DIRS = @INSTALL_DIRS@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIB_LDFLAGS = @LIB_LDFLAGS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MUNGE_CPPFLAGS = @MUNGE_CPPFLAGS@
+MUNGE_LDFLAGS = @MUNGE_LDFLAGS@
+MUNGE_LIBS = @MUNGE_LIBS@
+NCURSES = @NCURSES@
+NUMA_LIBS = @NUMA_LIBS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PAM_LIBS = @PAM_LIBS@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PROCTRACKDIR = @PROCTRACKDIR@
+PROJECT = @PROJECT@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+READLINE_LIBS = @READLINE_LIBS@
+RELEASE = @RELEASE@
+SEMAPHORE_LIBS = @SEMAPHORE_LIBS@
+SEMAPHORE_SOURCES = @SEMAPHORE_SOURCES@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SLURMCTLD_PORT = @SLURMCTLD_PORT@
+SLURMD_PORT = @SLURMD_PORT@
+SLURM_API_AGE = @SLURM_API_AGE@
+SLURM_API_CURRENT = @SLURM_API_CURRENT@
+SLURM_API_MAJOR = @SLURM_API_MAJOR@
+SLURM_API_REVISION = @SLURM_API_REVISION@
+SLURM_API_VERSION = @SLURM_API_VERSION@
+SLURM_MAJOR = @SLURM_MAJOR@
+SLURM_MICRO = @SLURM_MICRO@
+SLURM_MINOR = @SLURM_MINOR@
+SLURM_VERSION = @SLURM_VERSION@
+SO_LDFLAGS = @SO_LDFLAGS@
+SSL_CPPFLAGS = @SSL_CPPFLAGS@
+SSL_LDFLAGS = @SSL_LDFLAGS@
+SSL_LIBS = @SSL_LIBS@
+STRIP = @STRIP@
+VERSION = @VERSION@
+WITH_AUTHD_FALSE = @WITH_AUTHD_FALSE@
+WITH_AUTHD_TRUE = @WITH_AUTHD_TRUE@
+WITH_GNU_LD_FALSE = @WITH_GNU_LD_FALSE@
+WITH_GNU_LD_TRUE = @WITH_GNU_LD_TRUE@
+WITH_MUNGE_FALSE = @WITH_MUNGE_FALSE@
+WITH_MUNGE_TRUE = @WITH_MUNGE_TRUE@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+AUTOMAKE_OPTIONS = foreign
+PLUGIN_FLAGS = -module -avoid-version --export-dynamic 
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common
+pkglib_LTLIBRARIES = sched_wiki2.la
+sched_wiki2_la_SOURCES = \
+	cancel_job.c	\
+	crypto.c	\
+	crypto.h	\
+	get_jobs.c	\
+	get_nodes.c	\
+	job_add_task.c	\
+	job_release_task.c \
+	msg.c		\
+	msg.h		\
+	resume_job.c	\
+	sched_wiki.c	\
+	start_job.c	\
+	suspend_job.c
+
+sched_wiki2_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/plugins/sched/wiki2/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  src/plugins/sched/wiki2/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(pkglibdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibdir)"
+	@list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f=$(am__strip_dir) \
+	    echo " $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \
+	    $(LIBTOOL) --mode=install $(pkglibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \
+	  else :; fi; \
+	done
+
+uninstall-pkglibLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@set -x; list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+	  p=$(am__strip_dir) \
+	  echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$p'"; \
+	  $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
+	done
+
+clean-pkglibLTLIBRARIES:
+	-test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+	@list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+sched_wiki2.la: $(sched_wiki2_la_OBJECTS) $(sched_wiki2_la_DEPENDENCIES) 
+	$(LINK) -rpath $(pkglibdir) $(sched_wiki2_la_LDFLAGS) $(sched_wiki2_la_OBJECTS) $(sched_wiki2_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cancel_job.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypto.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_jobs.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get_nodes.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/job_add_task.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/job_release_task.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resume_job.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sched_wiki.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/start_job.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/suspend_job.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+	for dir in "$(DESTDIR)$(pkglibdir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-pkglibLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-pkglibLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-pkglibLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-pkglibLTLIBRARIES install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-info-am \
+	uninstall-pkglibLTLIBRARIES
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/plugins/sched/wiki2/cancel_job.c b/src/plugins/sched/wiki2/cancel_job.c
new file mode 100644
index 0000000000000000000000000000000000000000..db4b463cc250d036c78795e3a6e4676fb0f8fc18
--- /dev/null
+++ b/src/plugins/sched/wiki2/cancel_job.c
@@ -0,0 +1,136 @@
+/*****************************************************************************\
+ *  cancel_job.c - Process Wiki cancel job request
+ *****************************************************************************
+ *  Copyright (C) 2006 The Regents of the University of California.
+ *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ *  Written by Morris Jette <jette1@llnl.gov>
+ *  UCRL-CODE-217948.
+ *  
+ *  This file is part of SLURM, a resource management program.
+ *  For details, see <http://www.llnl.gov/linux/slurm/>.
+ *  
+ *  SLURM is free software; you can redistribute it and/or modify it under
+ *  the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  any later version.
+ *  
+ *  SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
+ *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ *  details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with SLURM; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+\*****************************************************************************/
+
+#include "./msg.h"
+#include "src/slurmctld/locks.h"
+#include "src/slurmctld/slurmctld.h"
+
+#define TYPE_ADMIN   0
+#define TYPE_TIMEOUT 1
+
+static int	_cancel_job(uint32_t jobid, int *err_code, char **err_msg);
+static int	_timeout_job(uint32_t jobid, int *err_code, char **err_msg);
+
+/* RET 0 on success, -1 on failure */
+extern int	cancel_job(char *cmd_ptr, int *err_code, char **err_msg)
+{
+	char *arg_ptr, *tmp_char;
+	int cancel_type = TYPE_ADMIN;
+	uint32_t jobid;
+	static char reply_msg[128];
+
+	arg_ptr = strstr(cmd_ptr, "ARG=");
+	if (arg_ptr == NULL) {
+		*err_code = 300;
+		*err_msg = "CANCELJOB lacks ARG";
+		error("wiki: CANCELJOB lacks ARG");
+		return -1;
+	}
+	jobid = strtol(arg_ptr+4, &tmp_char, 10);
+	if (!isspace(tmp_char[0])) {
+		*err_code = 300;
+		*err_msg = "Invalid ARG value";
+		error("wiki: CANCELJOB has invalid jobid");
+		return -1;
+	}
+
+	if      (strstr(cmd_ptr, "TYPE=TIMEOUT") != 0)
+		cancel_type = TYPE_TIMEOUT;
+	else if (strstr(cmd_ptr, "TYPE=WALLCLOCK") != 0)
+		cancel_type = TYPE_TIMEOUT;
+	else if (strstr(cmd_ptr, "TYPE=ADMIN") != 0)
+		cancel_type = TYPE_ADMIN;
+	else if (strstr(cmd_ptr, "TYPE=") != 0) {
+		*err_code = 300;
+		*err_msg = "Invalid TYPE value";
+		error("wiki: CANCELJOB has invalid TYPE");
+		return -1;
+	}
+	
+	if (cancel_type == TYPE_ADMIN) {
+		if (_cancel_job(jobid, err_code, err_msg) != 0)
+			return -1;
+	} else {
+		if (_timeout_job(jobid, err_code, err_msg) != 0)
+			return -1;
+	}
+
+	snprintf(reply_msg, sizeof(reply_msg), 
+		"job %u cancelled successfully", jobid);
+	*err_msg = reply_msg;
+	return 0;
+}
+
+/* Cancel a job now */
+static int	_cancel_job(uint32_t jobid, int *err_code, char **err_msg)
+{
+	int rc = 0, slurm_rc;
+	/* Write lock on job info */
+	slurmctld_lock_t job_write_lock = {
+		NO_LOCK, WRITE_LOCK, NO_LOCK, NO_LOCK };
+
+	lock_slurmctld(job_write_lock);
+	slurm_rc = job_signal(jobid, SIGKILL, 0, 0);
+	if (slurm_rc != SLURM_SUCCESS) {
+		*err_code = 700;
+		*err_msg = slurm_strerror(slurm_rc);
+		error("wiki: Failed to signal job %u (%m)", jobid);
+		rc = -1;
+		goto fini;
+	}
+
+	debug("wiki: cancel job %u", jobid);
+
+ fini:	unlock_slurmctld(job_write_lock);
+	return rc;
+}
+
+/* Set timeout for specific job, the job will be purged soon */
+static int	_timeout_job(uint32_t jobid, int *err_code, char **err_msg)
+{
+	int rc = 0;
+	struct job_record *job_ptr;
+	/* Write lock on job info */
+	slurmctld_lock_t job_write_lock = {
+		NO_LOCK, WRITE_LOCK, NO_LOCK, NO_LOCK };
+
+	lock_slurmctld(job_write_lock);
+	job_ptr = find_job_record(jobid);
+	if (job_ptr == NULL) {
+		*err_code = 700;
+		*err_msg = "No such job";
+		error("wiki: Failed to find job %u", jobid);
+		rc = -1;
+		goto fini;
+	}
+
+	job_ptr->end_time = time(NULL);
+	debug("wiki: set end time for job %u", jobid);
+
+ fini:	unlock_slurmctld(job_write_lock);
+	return rc;
+}
+
diff --git a/src/plugins/sched/wiki2/crypto.c b/src/plugins/sched/wiki2/crypto.c
new file mode 100644
index 0000000000000000000000000000000000000000..4f88ed101f988ce679094da4d34502eb2b07f7e8
--- /dev/null
+++ b/src/plugins/sched/wiki2/crypto.c
@@ -0,0 +1,134 @@
+/*****************************************************************************\
+ *  crypto.c - DES cryptographic routines.
+ *****************************************************************************
+ *  Produced by Cluster Resources, Inc., no rights reserved. 
+\*****************************************************************************/
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define MAX_ITERATION 4
+
+/**************************************************************
+ * des
+ **************************************************************
+ * DESCRIPTION
+ * Compute a DES digest for a CRC according to a particular
+ * key.
+ *  
+ * ARGUMENTS
+ * lword (in/out) - The CRC to encode, which becomes the first
+ *		lexical segment of the checksum.
+ * irword (in/out ) - The key with which to encode the CRC,
+ *		which becomes the second lexical segment of
+ *		the checksum.
+ *  
+ * RETURNS
+ * None.
+ *
+ * SOURCE
+ * Cluster Resources, Inc., no rights reserved.
+ **************************************************************/
+static void des( uint32_t *lword, uint32_t *irword )
+{
+	int idx;
+	uint32_t ia, ib, iswap, itmph, itmpl;
+
+	static uint32_t c1[ MAX_ITERATION ] = {
+		0xcba4e531,
+		0x537158eb,
+		0x145cdc3c,
+		0x0d3fdeb2
+	};
+	static uint32_t c2[ MAX_ITERATION ] = {
+		0x12be4590,
+		0xab54ce58,
+		0x6954c7a6,
+		0x15a2ca46
+	};
+
+	itmph = 0;
+	itmpl = 0;
+
+	for ( idx = 0; idx < MAX_ITERATION; ++idx ) {
+		iswap = *irword;
+		ia = iswap ^ c1[ idx ];
+		itmpl = ia & 0xffff;
+		itmph = ia >> 16;
+		ib = itmpl * itmpl + ~( itmph * itmph );
+		ia = (ib >> 16) | ( (ib & 0xffff) << 16 );
+		*irword = (*lword) ^ ( (ia ^c2[ idx ]) + (itmpl * itmph) );
+		*lword = iswap;
+	}
+}
+
+/**************************************************************
+ * compute_crc
+ **************************************************************
+ * DESCRIPTION
+ * Compute a cyclic redundancy check (CRC) character-wise.
+ *  
+ * ARGUMENTS
+ * crc (in) - The CRC computed thus far.
+ * onech (in) - The character to be added to the CRC.
+ * 
+ * RETURNS
+ * The new CRC value.
+ *
+ * SOURCE
+ * Cluster Resources, Inc., no rights reserved.
+ **************************************************************/
+static uint16_t compute_crc( uint16_t crc, uint8_t onech )
+{
+	int idx;
+	uint32_t ans  = ( crc ^ onech << 8 );
+
+	for ( idx = 0; idx < 8; ++idx ) {
+		if ( ans & 0x8000 ) {
+			ans <<= 1;
+			ans = ans ^ 4129;
+		} else {
+			ans <<= 1;
+		}
+	}
+
+	return ans;
+}
+
+/**************************************************************
+ * checksum
+ **************************************************************
+ * DESCRIPTION
+ * Compute a Wiki checksum for the current message contents
+ * and return the result as a Wiki name-value pair.
+ * 
+ * ARGUMENTS
+ * sum (out) - The string in which to store the resulting
+ *		checksum.
+ * key(in) - The seed value for the checksum.  This must be
+ *		coordinated with the scheduler so that they
+ *		both use the same value.  It is a string of
+ *		ASCII decimal digits.
+ *  
+ * RETURNS
+ * None.
+ **************************************************************/
+extern void checksum( char *sum, const char * const key )
+{
+	uint32_t crc = 0;
+	uint32_t lword, irword;
+	int idx, key_len = strlen(key);
+	uint32_t seed = (uint32_t) strtol( key, NULL, 0 );
+
+	for ( idx = 0; idx < key_len; ++idx ) {
+		crc = (uint32_t) compute_crc( crc, key[idx] );
+	}
+
+	lword = crc;
+	irword = seed;
+
+	des( &lword, &irword );
+
+	sprintf(sum, "CK=%08x%08x", lword, irword);
+}
diff --git a/src/plugins/sched/wiki2/crypto.h b/src/plugins/sched/wiki2/crypto.h
new file mode 100644
index 0000000000000000000000000000000000000000..15c587d7988c0e5bac594eb6509f3e22c2fb88ab
--- /dev/null
+++ b/src/plugins/sched/wiki2/crypto.h
@@ -0,0 +1,8 @@
+/*****************************************************************************\
+ *  crypto.h - DES cryptographic routines.
+ *****************************************************************************
+ *  Produced by Cluster Resources, Inc., no rights reserved. 
+\*****************************************************************************/
+#include <stdint.h>
+
+extern void	checksum( char *sum, const char * const key );
diff --git a/src/plugins/sched/wiki2/get_jobs.c b/src/plugins/sched/wiki2/get_jobs.c
new file mode 100644
index 0000000000000000000000000000000000000000..15722301ee134632d9fb0b1112dec0492d3eda2a
--- /dev/null
+++ b/src/plugins/sched/wiki2/get_jobs.c
@@ -0,0 +1,257 @@
+/*****************************************************************************\
+ *  get_jobs.c - Process Wiki get job info request
+ *****************************************************************************
+ *  Copyright (C) 2006 The Regents of the University of California.
+ *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ *  Written by Morris Jette <jette1@llnl.gov>
+ *  UCRL-CODE-217948.
+ *  
+ *  This file is part of SLURM, a resource management program.
+ *  For details, see <http://www.llnl.gov/linux/slurm/>.
+ *  
+ *  SLURM is free software; you can redistribute it and/or modify it under
+ *  the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  any later version.
+ *  
+ *  SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
+ *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ *  details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with SLURM; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+\*****************************************************************************/
+
+#include <grp.h>
+#include <sys/types.h>
+
+#include "./msg.h"
+#include "src/common/list.h"
+#include "src/common/uid.h"
+#include "src/slurmctld/locks.h"
+#include "src/slurmctld/slurmctld.h"
+
+static char *	_dump_all_jobs(int *job_cnt);
+static char *	_dump_job(struct job_record *job_ptr);
+static char *	_get_group_name(gid_t gid);
+static uint32_t	_get_job_min_disk(struct job_record *job_ptr);
+static uint32_t	_get_job_min_mem(struct job_record *job_ptr);
+static uint32_t	_get_job_min_nodes(struct job_record *job_ptr);
+static char *	_get_job_state(struct job_record *job_ptr);
+static uint32_t	_get_job_submit_time(struct job_record *job_ptr);
+static uint32_t	_get_job_tasks(struct job_record *job_ptr);
+static uint32_t	_get_job_time_limit(struct job_record *job_ptr);
+
+/*
+ * get_jobs - get information on specific job(s) changed since some time
+ * cmd_ptr IN - CMD=GETJOBS ARG=[<UPDATETIME>:<JOBID>[:<JOBID>]...]
+ *                              [<UPDATETIME>:ALL]
+ * RET 0 on success, -1 on failure
+ *
+ * Response format
+ * ARG=<cnt>#<JOBID>;UPDATE_TIME=<uts>;STATE=<state>;UCLIMIT=<time_limit>;
+ *                    TASKS=<cpus>;QUEUETIME=<submit_time>;STARTTIME=<time>;
+ *                    UNAME=<user>;GNAME=<group>;PARTITIONMASK=<part>;
+ *                    NODES=<node_cnt>;RMEM=<mem_size>;RDISK=<disk_space>;
+ *         [#<JOBID>;...];
+ */
+/* RET 0 on success, -1 on failure */
+extern int	get_jobs(char *cmd_ptr, int *err_code, char **err_msg)
+{
+	char *arg_ptr, *tmp_char, *tmp_buf, *buf = NULL;
+	time_t update_time;
+	/* Locks: read job, partition */
+	slurmctld_lock_t job_read_lock = {
+		NO_LOCK, READ_LOCK, NO_LOCK, READ_LOCK };
+	int job_rec_cnt = 0, buf_size = 0;
+
+	arg_ptr = strstr(cmd_ptr, "ARG=");
+	if (arg_ptr == NULL) {
+		*err_code = 300;
+		*err_msg = "GETJOBS lacks ARG";
+		error("wiki: GETJOBS lacks ARG");
+		return -1;
+	}
+	update_time = (time_t) strtol(arg_ptr+4, &tmp_char, 10);
+	if (tmp_char[0] != ':') {
+		*err_code = 300;
+		*err_msg = "Invalid ARG value";
+		error("wiki: GETJOBS has invalid ARG value");
+		return -1;
+	}
+	tmp_char++;
+	lock_slurmctld(job_read_lock);
+	if (update_time > last_job_update) {
+		; /* No updates */
+	} else if (strncmp(tmp_char, "ALL", 3) == 0) {
+		/* report all jobs */
+		buf = _dump_all_jobs(&job_rec_cnt);
+	} else {
+		struct job_record *job_ptr;
+		char *job_name, *tmp2_char;
+		uint32_t job_id;
+
+		job_name = strtok_r(tmp_char, ":", &tmp2_char);
+		while (job_name) {
+			job_id = (uint32_t) strtol(job_name, NULL, 10);
+			job_ptr = find_job_record(job_id);
+			tmp_buf = _dump_job(job_ptr);
+			if (job_rec_cnt > 0)
+				xstrcat(buf, "#");
+			xstrcat(buf, tmp_buf);
+			xfree(tmp_buf);
+			job_rec_cnt++;
+			job_name = strtok_r(NULL, ":", &tmp2_char);
+		}
+	}
+	unlock_slurmctld(job_read_lock);
+
+	/* Prepend ("ARG=%d", job_rec_cnt) to reply message */
+	if (buf)
+		buf_size = strlen(buf);
+	tmp_buf = xmalloc(buf_size + 32);
+	sprintf(tmp_buf, "SC=0 ARG=%d#%s", job_rec_cnt, buf);
+	xfree(buf);
+	*err_code = 0;
+	*err_msg = tmp_buf;
+	return 0;
+}
+
+static char *   _dump_all_jobs(int *job_cnt)
+{
+	int cnt = 0;
+	struct job_record *job_ptr;
+	ListIterator job_iterator;
+	char *tmp_buf, *buf = NULL;
+
+	job_iterator = list_iterator_create(job_list);
+	while ((job_ptr = (struct job_record *) list_next(job_iterator))) {
+		tmp_buf = _dump_job(job_ptr);
+		if (cnt > 0)
+			xstrcat(buf, "#");
+		xstrcat(buf, tmp_buf);
+		xfree(tmp_buf);
+		cnt++;
+	}
+	*job_cnt = cnt;
+	return buf;
+}
+
+static char *	_dump_job(struct job_record *job_ptr)
+{
+	char tmp[512], *buf = NULL;
+
+	if (!job_ptr)
+		return NULL;
+
+	snprintf(tmp, sizeof(tmp), 
+		"%u:UPDATETIME=%u;STATE=%s;WCLIMIT=%u;",
+		job_ptr->job_id, 
+		(uint32_t) job_ptr->time_last_active,
+		_get_job_state(job_ptr),
+		(uint32_t) _get_job_time_limit(job_ptr));
+	xstrcat(buf, tmp);
+
+	snprintf(tmp, sizeof(tmp),
+		"TASKS=%u;QUEUETIME=%u;STARTTIME=%u;",
+		_get_job_tasks(job_ptr),
+		_get_job_submit_time(job_ptr),
+		(uint32_t) job_ptr->start_time);
+	xstrcat(buf, tmp);
+
+	snprintf(tmp, sizeof(tmp),
+		"UNAME=%s;GNAME=%s;PARTITIONMASK=%s;NODES=%u;",
+		uid_to_string((uid_t) job_ptr->user_id),
+		_get_group_name(job_ptr->group_id),
+		job_ptr->partition,
+		_get_job_min_nodes(job_ptr));
+	xstrcat(buf, tmp);
+
+	snprintf(tmp, sizeof(tmp),
+		"RMEM=%u;RDISK=%u;",
+		_get_job_min_mem(job_ptr),
+		_get_job_min_disk(job_ptr));
+	xstrcat(buf, tmp);
+
+	return buf;
+}
+
+static uint32_t _get_job_min_mem(struct job_record *job_ptr)
+{
+	if (job_ptr->details)
+		return job_ptr->details->min_memory;
+	return (uint32_t) 0;
+}
+
+static uint32_t _get_job_min_disk(struct job_record *job_ptr)
+	
+{
+	if (job_ptr->details)
+		return job_ptr->details->min_tmp_disk;
+	return (uint32_t) 0;
+}
+
+static uint32_t	_get_job_min_nodes(struct job_record *job_ptr)
+{
+	if (job_ptr->details)
+		return job_ptr->details->min_nodes;
+	return (uint32_t) 1;
+}
+
+static char *	_get_group_name(gid_t gid)
+{
+	struct group *grp;
+
+	grp = getgrgid(gid);
+	if (grp)
+		return grp->gr_name;
+	return "nobody";
+}
+
+static uint32_t _get_job_submit_time(struct job_record *job_ptr)
+{
+	if (job_ptr->details)
+		return (uint32_t) job_ptr->details->submit_time;
+	return (uint32_t) 0;
+}
+
+static uint32_t _get_job_tasks(struct job_record *job_ptr)
+{
+	if (job_ptr->num_procs)
+		return job_ptr->num_procs;
+	return (uint32_t) 1;
+}
+
+static uint32_t	_get_job_time_limit(struct job_record *job_ptr)
+{
+	uint32_t limit = job_ptr->time_limit;
+
+	if ((limit == NO_VAL) || (limit == INFINITE))
+		return (uint32_t) 0;
+	else
+		return (limit * 60);	/* seconds, not minutes */
+}
+
+static char *	_get_job_state(struct job_record *job_ptr)
+{
+	uint16_t state = job_ptr->job_state;
+	uint16_t base_state = state & (~JOB_COMPLETING);
+
+	if (base_state == JOB_PENDING)
+		return "Idle";
+	if ((base_state == JOB_RUNNING)
+	||  (state & JOB_COMPLETING))
+		return "Running";
+	if (base_state == JOB_COMPLETE)
+		return "Completed";
+#if 0
+	if ((base_state == JOB_CANCELLED)
+	||  (base_state == JOB_FAILED)
+	||  (base_state == JOB_TIMEOUT)
+	||  (base_state == JOB_NODE_FAIL))
+#endif
+	return "Removed";
+}
+
diff --git a/src/plugins/sched/wiki2/get_nodes.c b/src/plugins/sched/wiki2/get_nodes.c
new file mode 100644
index 0000000000000000000000000000000000000000..1674fddc9095ea301214ce7e5b7783dfb78bbe1e
--- /dev/null
+++ b/src/plugins/sched/wiki2/get_nodes.c
@@ -0,0 +1,227 @@
+/*****************************************************************************\
+ *  get_nodes.c - Process Wiki get node info request
+ *****************************************************************************
+ *  Copyright (C) 2006 The Regents of the University of California.
+ *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ *  Written by Morris Jette <jette1@llnl.gov>
+ *  UCRL-CODE-217948.
+ *  
+ *  This file is part of SLURM, a resource management program.
+ *  For details, see <http://www.llnl.gov/linux/slurm/>.
+ *  
+ *  SLURM is free software; you can redistribute it and/or modify it under
+ *  the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  any later version.
+ *  
+ *  SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
+ *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ *  details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with SLURM; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+\*****************************************************************************/
+
+#include "./msg.h"
+#include "src/slurmctld/locks.h"
+#include "src/slurmctld/slurmctld.h"
+
+static char *	_dump_all_nodes(int *node_cnt);
+static char *	_dump_node(struct node_record *node_ptr);
+static char *	_get_node_state(struct node_record *node_ptr);
+
+/*
+ * get_nodes - get information on specific node(s) changed since some time
+ * cmd_ptr IN - CMD=GETNODES ARG=[<UPDATETIME>:<NODEID>[:<NODEID>]...]
+ *                               [<UPDATETIME>:ALL]
+ * RET 0 on success, -1 on failure
+ *
+ * Response format
+ * ARG=<cnt>#<NODEID>:STATE=<state>;CMEMORY=<mb>;CDISK=<mb>;CPROC=<cpus>;
+ *                    FEATURE=<feature:feature>;
+ *                    CCLASS=<part>:<cpus>[,<part>:<cpus>];
+ *                    ACLASS=<part>:<cpus>[,<part>:<cpus>];
+ *         [#<NODEID>:...];
+ */
+extern int	get_nodes(char *cmd_ptr, int *err_code, char **err_msg)
+{
+	char *arg_ptr, *tmp_char, *tmp_buf, *buf = NULL;
+	time_t update_time;
+	/* Locks: read node, read partition */
+	slurmctld_lock_t node_read_lock = {
+		NO_LOCK, NO_LOCK, READ_LOCK, READ_LOCK };
+	int node_rec_cnt = 0, buf_size = 0;
+
+	arg_ptr = strstr(cmd_ptr, "ARG=");
+	if (arg_ptr == NULL) {
+		*err_code = 300;
+		*err_msg = "GETNODES lacks ARG";
+		error("wiki: GETNODES lacks ARG");
+		return -1;
+	}
+	update_time = (time_t) strtol(arg_ptr+4, &tmp_char, 10);
+	if (tmp_char[0] != ':') {
+		*err_code = 300;
+		*err_msg = "Invalid ARG value";
+		error("wiki: GETNODES has invalid ARG value");
+		return -1;
+	}
+	tmp_char++;
+	lock_slurmctld(node_read_lock);
+	if (update_time > last_node_update) {
+		; /* No updates */
+	} else if (strncmp(tmp_char, "ALL", 3) == 0) {
+		/* report all nodes */
+		buf = _dump_all_nodes(&node_rec_cnt);
+	} else {
+		struct node_record *node_ptr;
+		char *node_name, *tmp2_char;
+
+		node_name = strtok_r(tmp_char, ":", &tmp2_char);
+		while (node_name) {
+			node_ptr = find_node_record(node_name);
+			tmp_buf = _dump_node(node_ptr);
+			if (node_rec_cnt > 0)
+				xstrcat(buf, "#");
+			xstrcat(buf, tmp_buf);
+			xfree(tmp_buf);
+			node_rec_cnt++;
+			node_name = strtok_r(NULL, ":", &tmp2_char);
+		}
+	}
+	unlock_slurmctld(node_read_lock);
+
+	/* Prepend ("ARG=%d", node_rec_cnt) to reply message */
+	if (buf)
+		buf_size = strlen(buf);
+	tmp_buf = xmalloc(buf_size + 32);
+	sprintf(tmp_buf, "SC=0 ARG=%d#%s", node_rec_cnt, buf);
+	xfree(buf);
+	*err_code = 0;
+	*err_msg = tmp_buf;
+	return 0;
+}
+
+static char *	_dump_all_nodes(int *node_cnt)
+{
+	int i, cnt = 0;
+	struct node_record *node_ptr = node_record_table_ptr;
+	char *tmp_buf, *buf = NULL;
+
+	for (i=0; i<node_record_count; i++, node_ptr++) {
+		if (node_ptr->name == NULL)
+			continue;
+		tmp_buf = _dump_node(node_ptr);
+		if (cnt > 0)
+			xstrcat(buf, "#");
+		xstrcat(buf, tmp_buf);
+		xfree(tmp_buf);
+		cnt++;
+	}
+	*node_cnt = cnt;
+	return buf;
+}
+
+static char *	_dump_node(struct node_record *node_ptr)
+{
+	char tmp[512], *buf = NULL;
+	int i;
+	uint32_t cpu_cnt;
+
+	if (!node_ptr)
+		return NULL;
+
+	snprintf(tmp, sizeof(tmp), "%s:STATE=%s;",
+		node_ptr->name, 
+		_get_node_state(node_ptr));
+	xstrcat(buf, tmp);
+
+#if 0
+	/* For now report actual resources on system 
+	 * rather than what the sys admins configured */
+	if (slurmctld_conf.fast_schedule) {
+		cpu_cnt = node_ptr->config_ptr->cpus;
+		snprintf(tmp, sizeof(tmp),
+			"CMEMORY=%u;CDISK=%u;CPROC=%u;",
+			node_ptr->config_ptr->real_memory,
+			node_ptr->config_ptr->tmp_disk,
+			node_ptr->config_ptr->cpus);
+	} else {
+#endif
+	cpu_cnt = node_ptr->cpus;
+	snprintf(tmp, sizeof(tmp),
+		"CMEMORY=%u;CDISK=%u;CPROC=%u;",
+		node_ptr->real_memory,
+		node_ptr->tmp_disk,
+		node_ptr->cpus);
+	xstrcat(buf, tmp);
+
+	if (node_ptr->config_ptr
+	&&  node_ptr->config_ptr->feature) {
+		snprintf(tmp, sizeof(tmp), "FEATURES=%s;",
+			node_ptr->config_ptr->feature);
+		/* comma separated to colon */
+		for (i=0; (tmp[i] != '\0'); i++) {
+			if ((tmp[i] == ',')
+			||  (tmp[i] == '|'))
+				tmp[i] = ':';
+		}
+		xstrcat(buf, tmp);
+	}
+
+	for (i=0; i<node_ptr->part_cnt; i++) {
+		char *header;
+		if (i == 0)
+			header = "CCLASS=";
+		else
+			header = ",";
+		snprintf(tmp, sizeof(tmp), "%s%s:%u", 
+			header,
+			node_ptr->part_pptr[i]->name,
+			cpu_cnt);
+		xstrcat(buf, tmp);
+#if 0
+/* FIXME: Modify to support consumable resources */
+uint32_t cpu_avail;	move to top of block
+
+		if ((node_ptr->node_state == NODE_STATE_IDLE)
+		||  (node_ptr->part_pptr[i]->shared == 2))
+			cpu_avail = cpu_cnt;
+		else
+			cpu_avail = 0;
+		if (i == 0)
+			header = "ACLASS=";
+		else
+			header = ",";
+		snprintf(tmp, sizeof(tmp), "%s%s:%u",
+			header,
+			node_ptr->part_pptr[i]->name,
+			cpu_cnt);
+		xstrcat(buf, tmp);
+#endif
+	}
+
+	return buf;
+}
+
+static char *	_get_node_state(struct node_record *node_ptr)
+{
+	uint16_t state = node_ptr->node_state;
+	uint16_t base_state = state & (~NODE_STATE_FLAGS);
+
+	if (state & NODE_STATE_DRAIN)
+		return "Draining";
+	if (state & NODE_STATE_COMPLETING)
+		return "Busy";
+
+	if (base_state == NODE_STATE_DOWN)
+		return "Down";
+	if (base_state == NODE_STATE_ALLOCATED)
+		return "Running";
+	if (base_state == NODE_STATE_IDLE)
+		return "Idle";
+	
+	return "Unknown";
+}
diff --git a/src/plugins/sched/wiki2/job_add_task.c b/src/plugins/sched/wiki2/job_add_task.c
new file mode 100644
index 0000000000000000000000000000000000000000..477e2cde6b515bb8de732369ea0e8ebc8e2b2ef9
--- /dev/null
+++ b/src/plugins/sched/wiki2/job_add_task.c
@@ -0,0 +1,36 @@
+/*****************************************************************************\
+ *  job_add_task.c - Process Wiki job add tasks request
+ *****************************************************************************
+ *  Copyright (C) 2006 The Regents of the University of California.
+ *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ *  Written by Morris Jette <jette1@llnl.gov>
+ *  UCRL-CODE-217948.
+ *  
+ *  This file is part of SLURM, a resource management program.
+ *  For details, see <http://www.llnl.gov/linux/slurm/>.
+ *  
+ *  SLURM is free software; you can redistribute it and/or modify it under
+ *  the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  any later version.
+ *  
+ *  SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
+ *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ *  details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with SLURM; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+\*****************************************************************************/
+
+#include "./msg.h"
+
+/* RET 0 on success, -1 on failure */
+extern int	job_add_task(char *cmd_ptr, int *err_code, char **err_msg)
+{
+	*err_code = 810;
+	*err_msg = "JOBADDTASK command not supported";
+	error("wiki: JOBADDTASK command not supported");
+	return -1;
+}
diff --git a/src/plugins/sched/wiki2/job_release_task.c b/src/plugins/sched/wiki2/job_release_task.c
new file mode 100644
index 0000000000000000000000000000000000000000..79985ebcf3706ed25d88f87a27f6bf9e5295575d
--- /dev/null
+++ b/src/plugins/sched/wiki2/job_release_task.c
@@ -0,0 +1,36 @@
+/*****************************************************************************\
+ *  job_release_task.c - Process Wiki job release tasks request
+ *****************************************************************************
+ *  Copyright (C) 2006 The Regents of the University of California.
+ *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ *  Written by Morris Jette <jette1@llnl.gov>
+ *  UCRL-CODE-217948.
+ *  
+ *  This file is part of SLURM, a resource management program.
+ *  For details, see <http://www.llnl.gov/linux/slurm/>.
+ *  
+ *  SLURM is free software; you can redistribute it and/or modify it under
+ *  the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  any later version.
+ *  
+ *  SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
+ *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ *  details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with SLURM; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+\*****************************************************************************/
+
+#include "./msg.h"
+
+/* RET 0 on success, -1 on failure */
+extern int	job_release_task(char *cmd_ptr, int *err_code, char **err_msg)
+{
+	*err_code = 810;
+	*err_msg = "JOBRELEASETASK command not supported";
+	error("wiki: JOBRELEASETASK command not supported");
+	return -1;
+}
diff --git a/src/plugins/sched/wiki2/msg.c b/src/plugins/sched/wiki2/msg.c
new file mode 100644
index 0000000000000000000000000000000000000000..780391395e9b021c660655761afa59f15d83ba7e
--- /dev/null
+++ b/src/plugins/sched/wiki2/msg.c
@@ -0,0 +1,474 @@
+/*****************************************************************************\
+ *  msg.c - Message/communcation manager for Wiki plugin
+ *****************************************************************************
+ *  Copyright (C) 2006 The Regents of the University of California.
+ *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ *  Written by Morris Jette <jette1@llnl.gov>
+ *  UCRL-CODE-217948.
+ *  
+ *  This file is part of SLURM, a resource management program.
+ *  For details, see <http://www.llnl.gov/linux/slurm/>.
+ *  
+ *  SLURM is free software; you can redistribute it and/or modify it under
+ *  the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  any later version.
+ *  
+ *  SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
+ *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ *  details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with SLURM; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+\*****************************************************************************/
+
+#include "./crypto.h"
+#include "./msg.h"
+#include "src/common/uid.h"
+
+static bool thread_running = false;
+static bool thread_shutdown = false;
+static pthread_mutex_t thread_flag_mutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_t msg_thread_id;
+static char *err_msg;
+static int   err_code;
+
+int init_prio_mode = PRIO_HOLD;
+char *auth_key = NULL;
+
+static char *	_get_wiki_conf_path(void);
+static void *	_msg_thread(void *no_data);
+static int	_parse_msg(char *msg, char **req);
+static void	_parse_wiki_config(void);
+static void	_proc_msg(slurm_fd new_fd, char *msg);
+static size_t	_read_bytes(int fd, char *buf, const size_t size);
+static char *	_recv_msg(slurm_fd new_fd);
+static size_t	_send_msg(slurm_fd new_fd, char *buf, size_t size);
+static void	_send_reply(slurm_fd new_fd, char *response);
+static void	_sig_handler(int signal);
+static size_t	_write_bytes(int fd, char *buf, const size_t size);
+
+/*****************************************************************************\
+ * spawn message hander thread
+\*****************************************************************************/
+extern int spawn_msg_thread(void)
+{
+	pthread_attr_t thread_attr_msg;
+
+	pthread_mutex_lock( &thread_flag_mutex );
+	if (thread_running) {
+		error("Wiki thread already running, not starting another");
+		pthread_mutex_unlock(&thread_flag_mutex);
+		return SLURM_ERROR;
+	}
+
+	_parse_wiki_config();
+	slurm_attr_init(&thread_attr_msg);
+	if (pthread_create(&msg_thread_id, &thread_attr_msg, 
+			_msg_thread, NULL))
+		fatal("pthread_create %m");
+
+	slurm_attr_destroy(&thread_attr_msg);
+	thread_running = true;
+	pthread_mutex_unlock(&thread_flag_mutex);
+	return SLURM_SUCCESS;
+}
+
+/*****************************************************************************\
+ * terminate message hander thread
+\*****************************************************************************/
+extern void term_msg_thread(void)
+{
+	pthread_mutex_lock(&thread_flag_mutex);
+	if (thread_running) {
+		thread_shutdown = true;
+		pthread_kill(msg_thread_id, SIGUSR1);
+	}
+	pthread_mutex_unlock(&thread_flag_mutex);
+}
+
+/*****************************************************************************\
+ * message hander thread
+\*****************************************************************************/
+static void *_msg_thread(void *no_data)
+{
+	slurm_fd sock_fd, new_fd;
+	slurm_addr cli_addr;
+	int sig_array[] = {SIGUSR1, 0};
+	char *msg;
+
+	if ((sock_fd = slurm_init_msg_engine_port(sched_get_port())) 
+			== SLURM_SOCKET_ERROR)
+		fatal("wiki: slurm_init_msg_engine_port %m");
+
+	/* SIGUSR1 used to interupt accept call */
+	xsignal(SIGUSR1, _sig_handler);
+	xsignal_unblock(sig_array);
+
+	/* Process incoming RPCs until told to shutdown */
+	while (!thread_shutdown) {
+		if ((new_fd = slurm_accept_msg_conn(sock_fd, &cli_addr))
+				== SLURM_SOCKET_ERROR) {
+			if (errno != EINTR)
+				error("wiki: slurm_accept_msg_conn %m");
+			continue;
+		}
+		/* It would be nice to create a pthread for each new 
+		 * RPC, but that leaks memory on some systems when 
+		 * done from a plugin. 
+		 * FIXME: Maintain a pool of and reuse them. */
+		err_code = 0;
+		err_msg = "";
+		msg = _recv_msg(new_fd);
+		_proc_msg(new_fd, msg);
+		xfree(msg);
+		slurm_close_accepted_conn(new_fd);
+	}
+	(void) slurm_shutdown_msg_engine(sock_fd);
+	pthread_exit((void *) 0);
+	return NULL;
+}
+
+/*****************************************************************************\
+ * _get_wiki_conf_path - return the pathname of the wiki.conf file
+ * return value must be xfreed
+\*****************************************************************************/
+static char * _get_wiki_conf_path(void)
+{
+	char *val = getenv("SLURM_CONF");
+	char *path = NULL;
+	int i;
+
+	if (!val)
+		val = default_slurm_config_file;
+
+	/* Replace file name on end of path */
+	i = strlen(val) + 1;
+	path = xmalloc(i);
+	strcpy(path, val);
+	val = strrchr(path, (int)'/');
+	if (val)	/* absolute path */
+		val++;
+	else		/* not absolute path */
+		val = path;
+	strcpy(val, "wiki.conf");
+
+	return path;
+}
+
+/*****************************************************************************\
+ * _parse_wiki_config - Results go into global variables
+ * 
+ * wiki_conf options
+ * JobPriority=hold|run
+ * AuthKey=number
+\*****************************************************************************/
+static void _parse_wiki_config(void)
+{
+	s_p_options_t options[] = {
+		{"AuthKey", S_P_STRING},
+		{"JobPriority", S_P_STRING}, 
+		{NULL} };
+	s_p_hashtbl_t *tbl;
+	char *priority_mode, *wiki_conf;
+	struct stat buf;
+
+	wiki_conf = _get_wiki_conf_path();
+	if ((wiki_conf == NULL) || (stat(wiki_conf, &buf) == -1)) {
+		debug("No wiki.conf file (%s)", wiki_conf);
+		xfree(wiki_conf);
+		return;
+	}
+
+	debug("Reading wiki.conf file (%s)",wiki_conf);
+	tbl = s_p_hashtbl_create(options);
+	if (s_p_parse_file(tbl, wiki_conf) == SLURM_ERROR)
+		fatal("something wrong with opening/reading wiki.conf file");
+
+	if (! s_p_get_string(&auth_key, "AuthKey", tbl)) {
+		debug("Warning: No wiki_conf AuthKey specified");
+	}
+
+	if (s_p_get_string(&priority_mode, "JobPriority", tbl)) {
+		if (strcasecmp(priority_mode, "hold") == 0)
+			init_prio_mode = PRIO_HOLD;
+		else if (strcasecmp(priority_mode, "run") == 0)
+			init_prio_mode = PRIO_DECREMENT;
+		else
+			error("Invalid value for JobPriority in wiki.conf");	
+		xfree(priority_mode);
+	}
+	s_p_hashtbl_destroy(tbl);
+	xfree(wiki_conf);
+
+	return;
+}
+
+/*****************************************************************************\
+ * _sig_handler: signal handler, interrupt communications thread
+\*****************************************************************************/
+static void _sig_handler(int signal)
+{
+}
+
+static size_t	_read_bytes(int fd, char *buf, const size_t size)
+{
+	size_t bytes_remaining, bytes_read;
+	char *ptr;
+
+	bytes_remaining = size;
+	ptr = buf;
+	while (bytes_remaining > 0) {
+		bytes_read = read(fd, ptr, bytes_remaining);
+		if (bytes_read <= 0)
+			return 0;
+		bytes_remaining -= bytes_read;
+		ptr += bytes_read;
+	}
+	
+	return size;
+}
+
+static size_t	_write_bytes(int fd, char *buf, const size_t size)
+{
+	size_t bytes_remaining, bytes_written;
+	char *ptr;
+
+	bytes_remaining = size;
+	ptr = buf;
+	while (bytes_remaining > 0) {
+		bytes_written = write(fd, ptr, size);
+		if (bytes_written < 0)
+			return 0;
+		bytes_remaining -= bytes_written;
+		ptr += bytes_written;
+	}
+	return size;
+}
+
+/*****************************************************************************\
+ * Read a message (request) from specified file descriptor 
+ *
+ * RET - The message which must be xfreed or 
+ *       NULL on error
+\*****************************************************************************/
+static char *	_recv_msg(slurm_fd new_fd)
+{
+	char header[10];
+	uint32_t size;
+	char *buf;
+
+	if (_read_bytes((int) new_fd, header, 9) != 9) {
+		err_code = 240;
+		err_msg = "failed to read message header";
+		error("wiki: failed to read message header %m");
+		return NULL;
+	}
+
+	if (sscanf(header, "%ul", &size) != 1) {
+		err_code = 244;
+		err_msg = "malformed message header";
+		error("wiki: malformed message header (%s)", header);
+		return NULL;
+	}
+
+	buf = xmalloc(size + 1);	/* need '\0' on end to print */
+	if (_read_bytes((int) new_fd, buf, size) != size) {
+		err_code = 246;
+		err_msg = "unable to read all message data";
+		error("wiki: unable to read data message");
+		xfree(buf);
+		return NULL;
+	}
+
+	debug("wiki msg recv:%s", buf);
+	return buf;
+}
+
+/*****************************************************************************\
+ * Send a message (response) to specified file descriptor 
+ *
+ * RET - Number of data bytes written (excludes header)
+\*****************************************************************************/
+static size_t	_send_msg(slurm_fd new_fd, char *buf, size_t size)
+{
+	char header[10];
+	size_t data_sent;
+
+	debug("wiki msg send:%s", buf);
+
+	(void) sprintf(header, "%08ul\n", (uint32_t) size);
+	if (_write_bytes((int) new_fd, header, 9) != 9) {
+		error("wiki: failed to write message header %m");
+		return 0;
+	}
+
+	data_sent = _write_bytes((int) new_fd, buf, size);
+	if (data_sent != size) {
+		error("wiki: unable to write data message (%lu of %lu) %m",
+			data_sent, size);
+	}
+
+	return data_sent;
+}
+
+/*****************************************************************************\
+ * Parse and checksum a wiki request
+ * msg IN - message to parse
+ * req OUT - pointer the request portion of the message
+ * RET 0 on success, -1 on error
+\*****************************************************************************/
+static int	_parse_msg(char *msg, char **req)
+{
+	char sum[20];	/* format is "CK=%08x%08x" */
+	char *auth_ptr = strstr(msg, "AUTH=");
+	char *dt_ptr = strstr(msg, "DT=");
+	char *ts_ptr = strstr(msg, "TS=");
+	char *cmd_ptr = strstr(msg, "CMD=");
+	time_t ts, now = time(NULL);
+	uint32_t delta_t;
+	
+	if (!auth_key && cmd_ptr) {
+		/* No authentication required */
+		*req = cmd_ptr;
+		return 0;
+	}
+/* FIXME: skip authentication for now */
+*req = cmd_ptr;
+return 0;
+
+	if (!auth_ptr) {
+		err_code = 300;
+		err_msg = "request lacks AUTH";
+		error("wiki: request lacks AUTH=");
+		return -1;
+	}
+
+	if (!dt_ptr) {
+		err_code = 300;
+		err_msg = "request lacks DT";
+		error("wiki: request lacks DT=");
+		return -1;
+	}
+
+	if (!ts_ptr) {
+		err_code = 300;
+		err_msg = "request lacks TS";
+		error("wiki: request lacks TS=");
+		return -1;
+	}
+	ts = strtol((ts_ptr+3), NULL, 10); 
+	if (ts < now)
+		delta_t = (uint32_t) difftime(now, ts);
+	else
+		delta_t = (uint32_t) difftime(ts, now);
+	if (delta_t > 300) {
+		err_code = 350;
+		err_msg = "TS value too far from NOW";
+		error("wiki: TS delta_t=%u", delta_t);
+		return -1;
+	}
+
+	if (auth_key) {
+		checksum(sum, ts_ptr);
+		if (strncmp(sum, msg, 19) != 0) {
+			err_code = 422;
+			err_msg = "bad checksum";
+			error("wiki: message checksum error");
+			return -1;
+		}
+	}
+
+	*req = dt_ptr + 3;
+	return 0;
+}
+
+/*****************************************************************************\
+ * Parse, process and respond to a request
+\*****************************************************************************/
+static void	_proc_msg(slurm_fd new_fd, char *msg)
+{
+	char *req, *cmd_ptr;
+	char response[128];
+
+	if (new_fd < 0)
+		return;
+
+	if (!msg)
+		goto err_msg;
+
+	if (_parse_msg(msg, &req) != 0)
+		goto err_msg;
+
+	cmd_ptr = strstr(req, "CMD=");
+	if (cmd_ptr == NULL) {
+		err_code = 300;
+		err_msg = "request lacks CMD"; 
+		error("wiki: request lacks CMD");
+		goto err_msg;
+	}
+	cmd_ptr +=4;
+	if        (strncmp(cmd_ptr, "GETJOBS", 7) == 0) {
+		if (get_jobs(cmd_ptr, &err_code, &err_msg))
+			goto err_msg;
+		/* sends reply below if no error */
+	} else if (strncmp(cmd_ptr, "GETNODES", 8) == 0) {
+		if (get_nodes(cmd_ptr, &err_code, &err_msg))
+			goto err_msg;
+		/* sends reply below if no error */
+	} else if (strncmp(cmd_ptr, "STARTJOB", 8) == 0) {
+		start_job(cmd_ptr, &err_code, &err_msg);
+		goto err_msg;	/* always send reply here */
+	} else if (strncmp(cmd_ptr, "CANCELJOB", 9) == 0) {
+		cancel_job(cmd_ptr, &err_code, &err_msg);
+		goto err_msg;	/* always send reply here */
+	} else if (strncmp(cmd_ptr, "SUSPENDJOB", 10) == 0) {
+		suspend_job(cmd_ptr, &err_code, &err_msg);
+		goto err_msg;	/* always send reply here */
+	} else if (strncmp(cmd_ptr, "RESUMEJOB", 9) == 0) {
+		resume_job(cmd_ptr, &err_code, &err_msg);
+		goto err_msg;	/* always send reply here */
+	} else if (strncmp(cmd_ptr, "JOBADDTASK", 10) == 0) {
+		job_add_task(cmd_ptr, &err_code, &err_msg);
+		goto err_msg;	/* always send reply here */
+	} else if (strncmp(cmd_ptr, "JOBRELEASETASK", 14) == 0) {
+		job_release_task(cmd_ptr, &err_code, &err_msg);
+		goto err_msg;	/* always send reply here */
+	} else {
+		err_code = 300;
+		err_msg = "unsupported request type";
+		error("wiki: unrecognized request type: %s", req);
+		goto err_msg;
+	}
+
+	/* Message is pre-formatted by get_jobs and get_nodes
+	 * ONLY if no error. Send message and xfree the buffer. */
+	_send_reply(new_fd, err_msg);
+	xfree(err_msg);
+	return;
+
+ err_msg:
+	snprintf(response, sizeof(response), 
+		"SC=%d;RESPONSE=%s", err_code, err_msg);
+	_send_reply(new_fd, response);
+	return;
+}
+
+static void	_send_reply(slurm_fd new_fd, char *response)
+{
+	size_t i;
+	char *buf, sum[20];
+
+	i = strlen(response);
+	i += 100;	/* leave room for header */
+	buf = xmalloc(i);
+
+	snprintf(buf, i, "CK=dummy67890123456 TS=%u AUTH=%s DT=%s", 
+		(uint32_t) time(NULL), uid_to_string(getuid()), response);
+	checksum(sum, (buf+20));   /* overwrite "CK=dummy..." above */
+	memcpy(buf, sum, 19);
+
+	(void) _send_msg(new_fd, buf, i);
+}
diff --git a/src/plugins/sched/wiki2/msg.h b/src/plugins/sched/wiki2/msg.h
new file mode 100644
index 0000000000000000000000000000000000000000..82af7d0b2e937ac66302e2041d3a385f77d75db2
--- /dev/null
+++ b/src/plugins/sched/wiki2/msg.h
@@ -0,0 +1,89 @@
+/*****************************************************************************\
+ *  msg.h - Message/communcation manager for Wiki plugin
+ *****************************************************************************
+ *  Copyright (C) 2006 The Regents of the University of California.
+ *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ *  Written by Morris Jette <jette1@llnl.gov>
+ *  UCRL-CODE-217948.
+ *  
+ *  This file is part of SLURM, a resource management program.
+ *  For details, see <http://www.llnl.gov/linux/slurm/>.
+ *  
+ *  SLURM is free software; you can redistribute it and/or modify it under
+ *  the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  any later version.
+ *  
+ *  SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
+ *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ *  details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with SLURM; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+\*****************************************************************************/
+
+/*
+ * Two modes of operation are currently supported for job prioritization:
+ *
+ * PRIO_HOLD: Wiki is a polling scheduler, so the initial priority is always 
+ * zero to keep SLURM from spontaneously starting the job.  The scheduler will 
+ * suggest which job's priority should be made non-zero and thus allowed to 
+ * proceed.
+ *
+ * PRIO_DECREMENT: Set the job priority to one less than the last job and let 
+ * Wiki change priorities of jobs as desired to re-order the queue
+ */
+
+#if HAVE_CONFIG_H
+#  include "config.h"
+#  if HAVE_INTTYPES_H
+#    include <inttypes.h>
+#  else
+#    if HAVE_STDINT_H
+#      include <stdint.h>
+#    endif
+#  endif  /* HAVE_INTTYPES_H */
+#else   /* !HAVE_CONFIG_H */
+#  include <inttypes.h>
+#endif  /*  HAVE_CONFIG_H */
+
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <slurm/slurm_errno.h>
+
+#include "src/common/hostlist.h"
+#include "src/common/log.h"
+#include "src/common/parse_config.h"
+#include "src/common/read_config.h"
+#include "src/common/slurm_protocol_api.h"
+#include "src/common/slurm_protocol_interface.h"
+#include "src/common/xmalloc.h"
+#include "src/common/xsignal.h"
+#include "src/common/xstring.h"
+#include "src/slurmctld/sched_plugin.h"
+
+#define PRIO_HOLD      0
+#define PRIO_DECREMENT 1
+extern int	init_prio_mode;
+
+extern char *	auth_key;
+
+extern int	spawn_msg_thread(void);
+extern void	term_msg_thread(void);
+
+/* Functions called from within msg.c (rather than creating a bunch 
+ * more header files with one function definition each */
+extern int	cancel_job(char *cmd_ptr, int *err_code, char **err_msg);
+extern int	get_jobs(char *cmd_ptr, int *err_code, char **err_msg);
+extern int 	get_nodes(char *cmd_ptr, int *err_code, char **err_msg);
+extern int	job_add_task(char *cmd_ptr, int *err_code, char **err_msg);
+extern int	job_release_task(char *cmd_ptr, int *err_code, char **err_msg);
+extern int	start_job(char *cmd_ptr, int *err_code, char **err_msg);
+extern int	suspend_job(char *cmd_ptr, int *err_code, char **err_msg);
+extern int	resume_job(char *cmd_ptr, int *err_code, char **err_msg);
diff --git a/src/plugins/sched/wiki2/resume_job.c b/src/plugins/sched/wiki2/resume_job.c
new file mode 100644
index 0000000000000000000000000000000000000000..bbf3954f21f627e6f23fe2aa5991f5407186a45b
--- /dev/null
+++ b/src/plugins/sched/wiki2/resume_job.c
@@ -0,0 +1,68 @@
+/*****************************************************************************\
+ *  resume_job.c - Process Wiki resume job request
+ *****************************************************************************
+ *  Copyright (C) 2006 The Regents of the University of California.
+ *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ *  Written by Morris Jette <jette1@llnl.gov>
+ *  UCRL-CODE-217948.
+ *  
+ *  This file is part of SLURM, a resource management program.
+ *  For details, see <http://www.llnl.gov/linux/slurm/>.
+ *  
+ *  SLURM is free software; you can redistribute it and/or modify it under
+ *  the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  any later version.
+ *  
+ *  SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
+ *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ *  details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with SLURM; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+\*****************************************************************************/
+
+#include "./msg.h"
+#include "src/slurmctld/slurmctld.h"
+
+/* RET 0 on success, -1 on failure */
+extern int	resume_job(char *cmd_ptr, int *err_code, char **err_msg)
+{
+	char *arg_ptr, *tmp_char;
+	int slurm_rc;
+	suspend_msg_t msg;
+	uint32_t jobid;
+	static char reply_msg[128];
+
+	arg_ptr = strstr(cmd_ptr, "ARG=");
+	if (arg_ptr == NULL) {
+		*err_code = 300;
+		*err_msg = "RESUMEJOB lacks ARG";
+		error("wiki: RESUMEJOB lacks ARG");
+		return -1;
+	}
+	jobid = strtol(arg_ptr+4, &tmp_char, 10);
+	if (!isspace(tmp_char[0])) {
+		*err_code = 300;
+		*err_msg = "Invalid ARG value";
+		error("wiki: RESUMEJOB has invalid jobid");
+		return -1;
+	}
+
+	msg.job_id = jobid;
+	msg.op = RESUME_JOB;
+	slurm_rc = job_suspend(&msg, 0, -1);
+	if (slurm_rc != SLURM_SUCCESS) {
+		*err_code = 700;
+		*err_msg = slurm_strerror(slurm_rc);
+		error("wiki: Failed to resume job %u (%m)", jobid);
+		return -1;
+	}
+
+	snprintf(reply_msg, sizeof(reply_msg),
+		"job %u resumed successfully", jobid);
+	*err_msg = reply_msg;
+	return 0;
+}
diff --git a/src/plugins/sched/wiki2/sched_wiki.c b/src/plugins/sched/wiki2/sched_wiki.c
new file mode 100644
index 0000000000000000000000000000000000000000..e2981c7fe01c61ec77b16407f4dabe56765c648a
--- /dev/null
+++ b/src/plugins/sched/wiki2/sched_wiki.c
@@ -0,0 +1,106 @@
+/*****************************************************************************\
+ *  sched_wiki.c - Wiki plugin for Moab and Maui schedulers.
+ *****************************************************************************
+ *  Copyright (C) 2006 The Regents of the University of California.
+ *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ *  Written by Morris Jette <jette1@llnl.gov>
+ *  UCRL-CODE-217948.
+ *  
+ *  This file is part of SLURM, a resource management program.
+ *  For details, see <http://www.llnl.gov/linux/slurm/>.
+ *  
+ *  SLURM is free software; you can redistribute it and/or modify it under
+ *  the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  any later version.
+ *  
+ *  SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
+ *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ *  details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with SLURM; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+\*****************************************************************************/
+
+#include <stdio.h>
+#include <slurm/slurm_errno.h>
+
+#include "src/common/plugin.h"
+#include "src/common/log.h"
+#include "./msg.h"
+
+const char		plugin_name[]	= "Wiki (Maui and Moab) Scheduler plugin";
+const char		plugin_type[]	= "sched/wiki2";
+const uint32_t		plugin_version	= 90;
+
+/* A plugin-global errno. */
+static int plugin_errno = SLURM_SUCCESS;
+
+/**************************************************************************/
+/*  TAG(                              init                              ) */
+/**************************************************************************/
+extern int init( void )
+{
+	verbose( "Wiki scheduler plugin loaded" );
+	return spawn_msg_thread();
+}
+
+/**************************************************************************/
+/*  TAG(                              fini                              ) */
+/**************************************************************************/
+extern void fini( void )
+{
+	term_msg_thread();
+}
+
+
+/***************************************************************************/
+/*  TAG(                   slurm_sched_plugin_schedule                   ) */
+/***************************************************************************/
+extern int slurm_sched_plugin_schedule( void )
+{
+	/* No action required */
+	return SLURM_SUCCESS;
+}
+
+
+/**************************************************************************/
+/* TAG(                   slurm_sched_plugin_initial_priority           ) */ 
+/**************************************************************************/
+extern uint32_t slurm_sched_plugin_initial_priority( uint32_t last_prio )
+{
+	if (init_prio_mode == PRIO_DECREMENT) {
+		if (last_prio >= 2)
+			return (last_prio - 1);
+		else
+			return 1;
+	} else 
+		return 0;
+}
+
+/**************************************************************************/
+/* TAG(              slurm_sched_plugin_job_is_pending                  ) */
+/**************************************************************************/
+void slurm_sched_plugin_job_is_pending( void )
+{
+	/* No action required */
+}
+
+/**************************************************************************/
+/* TAG(              slurm_sched_get_errno                              ) */
+/**************************************************************************/
+int slurm_sched_get_errno( void )
+{
+	return plugin_errno;
+}
+
+/**************************************************************************/
+/* TAG(              slurm_sched_strerror                               ) */
+/**************************************************************************/
+char *slurm_sched_strerror( int errnum )
+{
+	return NULL;
+}
+
diff --git a/src/plugins/sched/wiki2/start_job.c b/src/plugins/sched/wiki2/start_job.c
new file mode 100644
index 0000000000000000000000000000000000000000..d71fe1f713408d2c7b6be703f5b5d1f204673ac1
--- /dev/null
+++ b/src/plugins/sched/wiki2/start_job.c
@@ -0,0 +1,187 @@
+/*****************************************************************************\
+ *  start_job.c - Process Wiki start job request
+ *****************************************************************************
+ *  Copyright (C) 2006 The Regents of the University of California.
+ *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ *  Written by Morris Jette <jette1@llnl.gov>
+ *  UCRL-CODE-217948.
+ *  
+ *  This file is part of SLURM, a resource management program.
+ *  For details, see <http://www.llnl.gov/linux/slurm/>.
+ *  
+ *  SLURM is free software; you can redistribute it and/or modify it under
+ *  the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  any later version.
+ *  
+ *  SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
+ *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ *  details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with SLURM; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+\*****************************************************************************/
+
+#include "./msg.h"
+#include "src/common/bitstring.h"
+#include "src/slurmctld/locks.h"
+#include "src/slurmctld/slurmctld.h"
+#include "src/slurmctld/state_save.h"
+
+static char *	_copy_nodelist_no_dup(char *node_list);
+static int	_start_job(uint32_t jobid, char *hostlist, 
+			int *err_code, char **err_msg);
+
+/* RET 0 on success, -1 on failure */
+extern int	start_job(char *cmd_ptr, int *err_code, char **err_msg)
+{
+	char *arg_ptr, *task_ptr, *node_ptr, *tmp_char;
+	int i;
+	uint32_t jobid;
+	hostlist_t hl;
+	char host_string[1024];
+	static char reply_msg[128];
+
+	arg_ptr = strstr(cmd_ptr, "ARG=");
+	if (arg_ptr == NULL) {
+		*err_code = 300;
+		*err_msg = "STARTJOB lacks ARG";
+		error("wiki: STARTJOB lacks ARG");
+		return -1;
+	}
+	jobid = strtol(arg_ptr+4, &tmp_char, 10);
+	if (!isspace(tmp_char[0])) {
+		*err_code = 300;
+		*err_msg = "Invalid ARG value";
+		error("wiki: STARTJOB has invalid jobid");
+		return -1;
+	}
+
+	task_ptr = strstr(cmd_ptr, "TASKLIST=");
+	if (task_ptr == NULL) {
+		*err_code = 300;
+		*err_msg = "STARTJOB lacks TASKLIST";
+		error("wiki: STARTJOB lacks TASKLIST");
+		return -1;
+	}
+	node_ptr = task_ptr + 9;
+	for (i=0; node_ptr[i]!='\0'; i++) {
+		if (node_ptr[i] == ':')
+			node_ptr[i] = ',';
+	}
+	hl = hostlist_create(node_ptr);
+	i = hostlist_ranged_string(hl, sizeof(host_string), host_string);
+	hostlist_destroy(hl);
+	if (i < 0) {
+		*err_code = 300;
+		*err_msg = "STARTJOB has invalid TASKLIST";
+		error("wiki: STARTJOB has invalid TASKLIST");
+		return -1;
+	}
+	if (_start_job(jobid, host_string, err_code, err_msg) != 0)
+		return -1;
+
+	snprintf(reply_msg, sizeof(reply_msg), 
+		"job %u started successfully", jobid);
+	*err_msg = reply_msg;
+	return 0;
+}
+
+static int	_start_job(uint32_t jobid, char *hostlist,
+			int *err_code, char **err_msg)
+{
+	int rc = 0;
+	struct job_record *job_ptr;
+	/* Write lock on job info, read lock on node info */
+	slurmctld_lock_t job_write_lock = {
+		NO_LOCK, WRITE_LOCK, READ_LOCK, NO_LOCK };
+	char *new_node_list;
+	bitstr_t *new_bitmap;
+
+	lock_slurmctld(job_write_lock);
+	job_ptr = find_job_record(jobid);
+	if (job_ptr == NULL) {
+		*err_code = 700;
+		*err_msg = "No such job";
+		error("wiki: Failed to find job %u", jobid);
+		rc = -1;
+		goto fini;
+	}
+
+	if ((job_ptr->details == NULL)
+	||  (job_ptr->job_state != JOB_PENDING)) {
+		*err_code = 700;
+		*err_msg = "Job not pending, can't update";
+		error("wiki: Attempt to change state of non-pending job %u",
+			jobid);
+		rc = -1;
+		goto fini;
+	}
+
+	new_node_list = _copy_nodelist_no_dup(hostlist);
+	if (hostlist && (new_node_list == NULL)) {
+		*err_code = 700;
+		*err_msg = "Invalid TASKLIST";
+		error("wiki: Attempt to set invalid node list for job %u, %s",
+			jobid, hostlist);
+		rc = -1;
+		goto fini;
+	}
+
+	if (node_name2bitmap(new_node_list, false, &new_bitmap) != 0) {
+		*err_code = 700;
+		*err_msg = "Invalid TASKLIST";
+		error("wiki: Attempt to set invalid node list for job %u, %s",
+			jobid, hostlist);
+		xfree(hostlist);
+		rc = -1;
+		goto fini;
+	}
+
+	/* Remove any excluded nodes, incompatable with Wiki */
+	if (job_ptr->details->exc_nodes) {
+		error("wiki: clearing exc_nodes for job %u", jobid);
+		xfree(job_ptr->details->exc_nodes);
+		if (job_ptr->details->exc_node_bitmap)
+			bit_free(job_ptr->details->exc_node_bitmap);
+	}
+
+	/* start it now */
+	xfree(job_ptr->details->req_nodes);
+	job_ptr->details->req_nodes = new_node_list;
+	if (job_ptr->details->req_node_bitmap)
+		bit_free(job_ptr->details->req_node_bitmap);
+	job_ptr->details->req_node_bitmap = new_bitmap;
+	job_ptr->priority = 1000000;
+
+ fini:	unlock_slurmctld(job_write_lock);
+	/* functions below provide their own locking */
+	if (rc == 0) {	/* New job to start ASAP */
+		(void) schedule();
+		schedule_node_save();
+		schedule_job_save();
+	}
+	return rc;
+}
+
+static char *	_copy_nodelist_no_dup(char *node_list)
+{
+	int   new_size = 128;
+	char *new_str;
+	hostlist_t hl = hostlist_create( node_list );
+
+	if (hl == NULL)
+		return NULL;
+
+	hostlist_uniq(hl);
+	new_str = xmalloc(new_size);
+	while (hostlist_ranged_string(hl, new_size, new_str) == -1) {
+		new_size *= 2;
+		xrealloc(new_str, new_size);
+	}
+	hostlist_destroy(hl);
+	return new_str;
+}
+
diff --git a/src/plugins/sched/wiki2/suspend_job.c b/src/plugins/sched/wiki2/suspend_job.c
new file mode 100644
index 0000000000000000000000000000000000000000..c3c74b3400c323a674310edf5676fe5c32fa74c2
--- /dev/null
+++ b/src/plugins/sched/wiki2/suspend_job.c
@@ -0,0 +1,68 @@
+/*****************************************************************************\
+ *  suspend_job.c - Process Wiki suspend job request
+ *****************************************************************************
+ *  Copyright (C) 2006 The Regents of the University of California.
+ *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ *  Written by Morris Jette <jette1@llnl.gov>
+ *  UCRL-CODE-217948.
+ *  
+ *  This file is part of SLURM, a resource management program.
+ *  For details, see <http://www.llnl.gov/linux/slurm/>.
+ *  
+ *  SLURM is free software; you can redistribute it and/or modify it under
+ *  the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  any later version.
+ *  
+ *  SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
+ *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ *  details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with SLURM; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+\*****************************************************************************/
+
+#include "./msg.h"
+#include "src/slurmctld/slurmctld.h"
+
+/* RET 0 on success, -1 on failure */
+extern int	suspend_job(char *cmd_ptr, int *err_code, char **err_msg)
+{
+	char *arg_ptr, *tmp_char;
+	int slurm_rc;
+	suspend_msg_t msg;
+	uint32_t jobid;
+	static char reply_msg[128];
+
+	arg_ptr = strstr(cmd_ptr, "ARG=");
+	if (arg_ptr == NULL) {
+		*err_code = 300;
+		*err_msg = "SUSPENDJOB lacks ARG";
+		error("wiki: SUSPENDJOB lacks ARG");
+		return -1;
+	}
+	jobid = strtol(arg_ptr+4, &tmp_char, 10);
+	if (!isspace(tmp_char[0])) {
+		*err_code = 300;
+		*err_msg = "Invalid ARG value";
+		error("wiki: SUSPENDJOB has invalid jobid");
+		return -1;
+	}
+
+	msg.job_id = jobid;
+	msg.op = SUSPEND_JOB;
+	slurm_rc = job_suspend(&msg, 0, -1);
+	if (slurm_rc != SLURM_SUCCESS) {
+		*err_code = 700;
+		*err_msg = slurm_strerror(slurm_rc);
+		error("wiki: Failed to suspend job %u (%m)", jobid);
+		return -1;
+	}
+
+	snprintf(reply_msg, sizeof(reply_msg),
+		"job %u suspended successfully", jobid);
+	*err_msg = reply_msg;
+	return 0;
+}
diff --git a/src/plugins/switch/federation/federation.c b/src/plugins/switch/federation/federation.c
index 27cfd015459c1aa08958f82ea5d42e582fd9d1ea..19c7c5ab6a7819c380a9cb6267db55857d59a72e 100644
--- a/src/plugins/switch/federation/federation.c
+++ b/src/plugins/switch/federation/federation.c
@@ -2461,15 +2461,17 @@ _pack_libstate(fed_libstate_t *lp, Buf buffer)
 
 /* Used by: slurmctld */
 void
-fed_libstate_save(Buf buffer)
+fed_libstate_save(Buf buffer, bool free_flag)
 {
 	_lock();
 	_pack_libstate(fed_state, buffer);
 
 	/* Clean up fed_state since backup slurmctld can repeatedly 
 	 * save and restore state */
-	_free_libstate(fed_state);
-	fed_state = NULL;	/* freed above */
+	if (free_flag) {
+		_free_libstate(fed_state);
+		fed_state = NULL;	/* freed above */
+	}
 	_unlock();
 }
 
diff --git a/src/plugins/switch/federation/federation.h b/src/plugins/switch/federation/federation.h
index 9e2a1108a146dacd430901ca1ef021b3018ec6c3..5e65e7d1a012caee7e446322bbbf543d5b9cd116 100644
--- a/src/plugins/switch/federation/federation.h
+++ b/src/plugins/switch/federation/federation.h
@@ -88,7 +88,7 @@ int fed_fini(void);
 int fed_unload_table(fed_jobinfo_t *jp);
 int fed_unpack_libstate(fed_libstate_t *lp, Buf buffer);
 int fed_get_jobinfo(fed_jobinfo_t *jp, int key, void *data);
-void fed_libstate_save(Buf buffer);
+void fed_libstate_save(Buf buffer, bool free_flag);
 int fed_libstate_restore(Buf buffer);
 int fed_job_step_complete(fed_jobinfo_t *jp, hostlist_t hl);
 int fed_job_step_allocated(fed_jobinfo_t *jp, hostlist_t hl);
diff --git a/src/plugins/switch/federation/switch_federation.c b/src/plugins/switch/federation/switch_federation.c
index 3ce12098ed8ede2ad2cff6d3e61dc62b96822bd9..a86eff3301dc5965b8b38ab50a5291b72d6baa5f 100644
--- a/src/plugins/switch/federation/switch_federation.c
+++ b/src/plugins/switch/federation/switch_federation.c
@@ -47,6 +47,7 @@
 bool fed_need_state_save = false;
 
 static void _spawn_state_save_thread(char *dir);
+static int  _switch_p_libstate_save(char * dir_name, bool free_flag);
 
 /* Type for error string table entries */
 typedef struct {
@@ -154,6 +155,12 @@ int switch_p_slurmd_step_init( void )
  * controller to repeatedly assume control primary server
  */
 int switch_p_libstate_save ( char * dir_name )
+{
+	return _switch_p_libstate_save(dir_name, true);
+}
+
+/* save and purge the libstate if free_flag is true */
+static int _switch_p_libstate_save ( char * dir_name, bool free_flag )
 {
 	Buf buffer;
 	char *file_name;
@@ -161,7 +168,7 @@ int switch_p_libstate_save ( char * dir_name )
 	int state_fd;
 	
 	buffer = init_buf(FED_LIBSTATE_LEN);
-	(void)fed_libstate_save(buffer);
+	(void)fed_libstate_save(buffer, free_flag);
 	file_name = xstrdup(dir_name);
 	xstrcat(file_name, "/fed_state");
 	(void)unlink(file_name);
@@ -203,7 +210,7 @@ int switch_p_libstate_save ( char * dir_name )
  *
  * NOTE: switch_p_libstate_restore is only called by slurmctld, and only
  * once at start-up.  We exploit (abuse?) this fact to spawn a pthread to
- * periodically call switch_p_libstate_save().
+ * periodically call _switch_p_libstate_save().
  */
 int switch_p_libstate_restore ( char * dir_name, bool recover )
 {
@@ -637,7 +644,7 @@ static void *_state_save_thread(void *arg)
 		sleep(300);
 		if (fed_need_state_save) {
 			fed_need_state_save = false;
-			switch_p_libstate_save(dir_name);
+			_switch_p_libstate_save(dir_name, false);
 		}
 	}
 }
diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c
index da76df1c7ab13bc250091660ed97073ca72777e4..c9504028cb1639b6d45decc0c6597f1225c00567 100644
--- a/src/slurmctld/job_mgr.c
+++ b/src/slurmctld/job_mgr.c
@@ -2081,7 +2081,7 @@ static int _write_data_to_file(char *file_name, char *data)
 		return SLURM_SUCCESS;
 	}
 
-	fd = creat(file_name, 0600);
+	fd = creat(file_name, 0700);
 	if (fd < 0) {
 		error("Error creating file %s, %m", file_name);
 		return ESLURM_WRITING_TO_FILE;
@@ -4113,7 +4113,8 @@ static int _resume_job_nodes(struct job_record *job_ptr)
  * job_suspend - perform some suspend/resume operation
  * IN sus_ptr - suspend/resume request message
  * IN uid - user id of the user issuing the RPC
- * IN conn_fd - file descriptor on which to send reply
+ * IN conn_fd - file descriptor on which to send reply, 
+ *              -1 if none
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_suspend(suspend_msg_t *sus_ptr, uid_t uid, 
@@ -4133,8 +4134,12 @@ extern int job_suspend(suspend_msg_t *sus_ptr, uid_t uid,
 		 * release and reuse of switch
 		 * windows associated with a job */
 		rc = ESLURM_NOT_SUPPORTED;
-		goto reply;
 	}
+#ifdef HAVE_BG
+	rc = ESLURM_NOT_SUPPORTED;
+#endif
+	if (rc)
+		goto reply;
 
 	/* find the job */
 	job_ptr = find_job_record (sus_ptr->job_id);
@@ -4201,13 +4206,15 @@ extern int job_suspend(suspend_msg_t *sus_ptr, uid_t uid,
     reply:
 	jobacct_g_suspend_slurmctld(job_ptr);
 
-	rc_msg.return_code = rc;
-	resp_msg.msg_type  = RESPONSE_SLURM_RC;
-	resp_msg.data      = &rc_msg;
-	forward_init(&resp_msg.forward, NULL);
-	resp_msg.ret_list = NULL;
-	resp_msg.forward_struct_init = 0;
-	slurm_send_node_msg(conn_fd, &resp_msg);
+	if (conn_fd >= 0) {
+		rc_msg.return_code = rc;
+		resp_msg.msg_type  = RESPONSE_SLURM_RC;
+		resp_msg.data      = &rc_msg;
+		forward_init(&resp_msg.forward, NULL);
+		resp_msg.ret_list = NULL;
+		resp_msg.forward_struct_init = 0;
+		slurm_send_node_msg(conn_fd, &resp_msg);
+	}
 	return rc;
 }
 
diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c
index 321fa8e29895ab74d9a61d45167437c02604a03e..3a40c6c42d76bcdd32e694c3407a9def1e6a053d 100644
--- a/src/slurmctld/node_scheduler.c
+++ b/src/slurmctld/node_scheduler.c
@@ -470,12 +470,6 @@ _pick_best_nodes(struct node_set *node_set_ptr, int node_set_size,
                         total_cpus = count_cpus(
 				job_ptr->details->req_node_bitmap);
                 }
-		if (total_nodes > req_nodes) {
-			info("_pick_best_nodes: required nodes exceed limit");
-                        if (cr_enabled) 
-                                FREE_NULL_BITMAP(partially_idle_node_bitmap);
-			return ESLURM_REQUESTED_NODE_CONFIG_UNAVAILABLE;
-		}
 		if (total_nodes > max_nodes) {
 			/* exceeds node limit */
                         if (cr_enabled) 
diff --git a/src/slurmctld/slurmctld.h b/src/slurmctld/slurmctld.h
index 34bdff95f2474835c1ac4bd86b167d38d2baee40..d751999032130faa214882f32ce6fc4ed7f95557 100644
--- a/src/slurmctld/slurmctld.h
+++ b/src/slurmctld/slurmctld.h
@@ -742,7 +742,8 @@ extern int job_step_checkpoint_comp(checkpoint_comp_msg_t *ckpt_ptr,
  * job_step_suspend - perform some suspend/resume operation
  * IN sus_ptr - suspend/resume request message
  * IN uid - user id of the user issuing the RPC
- * IN conn_fd - file descriptor on which to send reply
+ * IN conn_fd - file descriptor on which to send reply,
+ *              -1 if none
  * RET 0 on success, otherwise ESLURM error code
  */
 extern int job_suspend(suspend_msg_t *sus_ptr, uid_t uid,