--- loncom/lond 2003/09/16 09:47:01 1.144 +++ loncom/lond 2003/09/16 10:13:20 1.145 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.144 2003/09/16 09:47:01 foxr Exp $ +# $Id: lond,v 1.145 2003/09/16 10:13:20 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -60,6 +60,10 @@ # 09/08/2003 Ron Fox: Told lond to take care of change logging so we # don't have to remember it: # $Log: lond,v $ +# Revision 1.145 2003/09/16 10:13:20 foxr +# Added ReinitProcess function to oversee the parsing and processing of the +# reinit: client request. +# # Revision 1.144 2003/09/16 09:47:01 foxr # Added skeletal support for SIGUSR2 (update hosts.tab) # @@ -100,7 +104,7 @@ my $DEBUG = 0; # Non zero to ena my $status=''; my $lastlog=''; -my $VERSION='$Revision: 1.144 $'; #' stupid emacs +my $VERSION='$Revision: 1.145 $'; #' stupid emacs my $remoteVERSION; my $currenthostid; my $currentdomainid; @@ -338,7 +342,7 @@ sub PushFile { if(!InstallFile($tablefile, $contents)) { &logthis(' Pushfile: unable to install ' - .$tablefile." $! "); + .$tablefile." $! "); return "error:$!"; } else { @@ -353,6 +357,28 @@ sub PushFile { return "ok"; } + +# +# Called to re-init either lonc or lond. +# +# Parameters: +# request - The full request by the client. This is of the form +# reinit: +# where is allowed to be either of +# lonc or lond +# +# Returns: +# The string to be sent back to the client either: +# ok - Everything worked just fine. +# error:why - There was a failure and why describes the reason. +# +# +sub ReinitProcess { + my $request = shift; + + return 'ok'; +} + # # Convert an error return code from lcpasswd to a string value. # @@ -952,7 +978,8 @@ sub make_new_child { if ($wasenc == 1) { my $cert = GetCertificate($userinput); if(ValidManager($cert)) { - print $client "ok\n"; + my $reply = ReinitProcess($userinput); + print $client "$reply\n"; } else { print $client "refused\n"; }