Diff for /loncom/lond between versions 1.240 and 1.244

version 1.240, 2004/08/24 20:59:15 version 1.244, 2004/08/28 15:52:51
Line 1282  sub push_file_handler { Line 1282  sub push_file_handler {
 }  }
 &register_handler("pushfile", \&push_file_handler, 1, 0, 1);  &register_handler("pushfile", \&push_file_handler, 1, 0, 1);
   
   #
   #   du  - list the disk usuage of a directory recursively. 
   #    
   #   note: stolen code from the ls file handler
   #   under construction by Rick Banghart 
   #    .
   # Parameters:
   #    $cmd        - The command that dispatched us (du).
   #    $ududir     - The directory path to list... I'm not sure what this
   #                  is relative as things like ls:. return e.g.
   #                  no_such_dir.
   #    $client     - Socket open on the client.
   # Returns:
   #     1 - indicating that the daemon should not disconnect.
   # Side Effects:
   #   The reply is written to  $client.
   #
   
   sub du_handler {
       my ($cmd, $ududir, $client) = @_;
       my $userinput = "$cmd:$ududir";
       my $duout='';
       my $du_cmd;
       $du_cmd = 'du -ks '.$ududir.' 2>/dev/null)';
       $duout = qx[$du_cmd];
       print $client "$du_cmd -- $ududir -- $duout\n";
       return 1;
   }
   &register_handler("du", \&du_handler, 0, 1, 0);
   
   
 #  #
Line 1349  sub ls_handler { Line 1377  sub ls_handler {
 &register_handler("ls", \&ls_handler, 0, 1, 0);  &register_handler("ls", \&ls_handler, 0, 1, 0);
   
   
   
   
 #   Process a reinit request.  Reinit requests that either  #   Process a reinit request.  Reinit requests that either
 #   lonc or lond be reinitialized so that an updated   #   lonc or lond be reinitialized so that an updated 
 #   host.tab or domain.tab can be processed.  #   host.tab or domain.tab can be processed.
Line 1909  sub remove_user_file_handler { Line 1939  sub remove_user_file_handler {
     my $file=$udir.'/userfiles/'.$ufile;      my $file=$udir.'/userfiles/'.$ufile;
     if (-e $file) {      if (-e $file) {
         if (-f $file){          if (-f $file){
         unlink($file);      unlink($file);
         }elsif(-d $file){   } elsif(-d $file) {
         rmdir($file);      rmdir($file);
  }   }
  if (-e $file) {   if (-e $file) {
     &Failure($client, "failed\n", "$cmd:$tail");      &Failure($client, "failed\n", "$cmd:$tail");
Line 2177  sub put_user_profile_entry { Line 2207  sub put_user_profile_entry {
   
     my $userinput = "$cmd:$tail";      my $userinput = "$cmd:$tail";
           
     my ($udom,$uname,$namespace,$what) =split(/:/,$tail);      my ($udom,$uname,$namespace,$what) =split(/:/,$tail,4);
     if ($namespace ne 'roles') {      if ($namespace ne 'roles') {
  chomp($what);   chomp($what);
  my $hashref = &tie_user_hash($udom, $uname, $namespace,   my $hashref = &tie_user_hash($udom, $uname, $namespace,

Removed from v.1.240  
changed lines
  Added in v.1.244


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>