Diff for /loncom/lond between versions 1.109 and 1.112

version 1.109, 2003/03/01 04:18:22 version 1.112, 2003/03/07 15:04:00
Line 856  sub make_new_child { Line 856  sub make_new_child {
                                unless (-e $fpnow) {                                 unless (-e $fpnow) {
    unless (mkdir($fpnow,0777)) {     unless (mkdir($fpnow,0777)) {
                                       $fperror="error: ".($!+0)                                        $fperror="error: ".($!+0)
   ." mkdir failed\n";    ." mkdir failed while attempting "
                                                 ."makeuser\n";
                                    }                                     }
                                }                                 }
                            }                             }
Line 1028  sub make_new_child { Line 1029  sub make_new_child {
                             print $client "ok\n";                               print $client "ok\n"; 
  } else {   } else {
                             print $client "error: ".($!+0)                              print $client "error: ".($!+0)
  ." IO::File->new Failed\n";   ." IO::File->new Failed "
                                       ."while attempting log\n";
         }          }
        }         }
 # ------------------------------------------------------------------------- put  # ------------------------------------------------------------------------- put
Line 1057  sub make_new_child { Line 1059  sub make_new_child {
                               print $client "ok\n";                                print $client "ok\n";
                            } else {                             } else {
                               print $client "error: ".($!+0)                                print $client "error: ".($!+0)
   ." untie(GDBM) failed\n";    ." untie(GDBM) failed ".
                                         "while attempting put\n";
                            }                             }
                        } else {                         } else {
                            print $client "error: ".($!)                             print $client "error: ".($!)
        ." tie(GDBM) Failed\n";         ." tie(GDBM) Failed ".
                                      "while attempting put\n";
                        }                         }
       } else {        } else {
                           print $client "refused\n";                            print $client "refused\n";
Line 1101  sub make_new_child { Line 1105  sub make_new_child {
                               print $client "ok\n";                                print $client "ok\n";
                            } else {                             } else {
                               print $client "error: ".($!+0)                                print $client "error: ".($!+0)
   ." untie(GDBM) Failed\n";    ." untie(GDBM) Failed ".
                                         "while attempting rolesput\n";
                            }                             }
                        } else {                         } else {
                            print $client "error: ".($!+0)                             print $client "error: ".($!+0)
        ." tie(GDBM) Failed\n";         ." tie(GDBM) Failed ".
                                      "while attempting rolesput\n";
                        }                         }
       } else {        } else {
                           print $client "refused\n";                            print $client "refused\n";
Line 1129  sub make_new_child { Line 1135  sub make_new_child {
                               print $client "$qresult\n";                                print $client "$qresult\n";
                            } else {                             } else {
                               print $client "error: ".($!+0)                                print $client "error: ".($!+0)
   ." untie(GDBM) Failed\n";    ." untie(GDBM) Failed ".
                                         "while attempting get\n";
                            }                             }
                        } else {                         } else {
                            print $client "error: ".($!+0)                             if ($!+0 == 2) {
        ." tie(GDBM) Failed\n";                                 print $client "error:No such file or ".
                                      "GDBM reported bad block error\n";
                              } else {
                                  print $client "error: ".($!+0)
                                      ." tie(GDBM) Failed ".
                                          "while attempting get\n";
                              }
                        }                         }
 # ------------------------------------------------------------------------ eget  # ------------------------------------------------------------------------ eget
                    } elsif ($userinput =~ /^eget/) {                     } elsif ($userinput =~ /^eget/) {
Line 1167  sub make_new_child { Line 1180  sub make_new_child {
                               }                                }
                            } else {                             } else {
                               print $client "error: ".($!+0)                                print $client "error: ".($!+0)
   ." untie(GDBM) Failed\n";    ." untie(GDBM) Failed ".
                                         "while attempting eget\n";
                            }                             }
                        } else {                         } else {
                            print $client "error: ".($!+0)                             print $client "error: ".($!+0)
        ." tie(GDBM) Failed\n";         ." tie(GDBM) Failed ".
                                      "while attempting eget\n";
                        }                         }
 # ------------------------------------------------------------------------- del  # ------------------------------------------------------------------------- del
                    } elsif ($userinput =~ /^del/) {                     } elsif ($userinput =~ /^del/) {
Line 1197  sub make_new_child { Line 1212  sub make_new_child {
                               print $client "ok\n";                                print $client "ok\n";
                            } else {                             } else {
                               print $client "error: ".($!+0)                                print $client "error: ".($!+0)
   ." untie(GDBM) Failed\n";    ." untie(GDBM) Failed ".
                                         "while attempting del\n";
                            }                             }
                        } else {                         } else {
                            print $client "error: ".($!+0)                             print $client "error: ".($!+0)
        ." tie(GDBM) Failed\n";         ." tie(GDBM) Failed ".
                                      "while attempting del\n";
                        }                         }
 # ------------------------------------------------------------------------ keys  # ------------------------------------------------------------------------ keys
                    } elsif ($userinput =~ /^keys/) {                     } elsif ($userinput =~ /^keys/) {
Line 1220  sub make_new_child { Line 1237  sub make_new_child {
                               print $client "$qresult\n";                                print $client "$qresult\n";
                            } else {                             } else {
                               print $client "error: ".($!+0)                                print $client "error: ".($!+0)
   ." untie(GDBM) Failed\n";    ." untie(GDBM) Failed ".
                                         "while attempting keys\n";
                            }                             }
                        } else {                         } else {
                            print $client "error: ".($!+0)                             print $client "error: ".($!+0)
        ." tie(GDBM) Failed\n";         ." tie(GDBM) Failed ".
                                      "while attempting keys\n";
                        }                         }
 # ----------------------------------------------------------------- dumpcurrent  # ----------------------------------------------------------------- dumpcurrent
                    } elsif ($userinput =~ /^currentdump/) {                     } elsif ($userinput =~ /^currentdump/) {
Line 1263  sub make_new_child { Line 1282  sub make_new_child {
                              print $client "$qresult\n";                               print $client "$qresult\n";
                            } else {                             } else {
                              print $client "error: ".($!+0)                               print $client "error: ".($!+0)
  ." untie(GDBM) Failed\n";   ." untie(GDBM) Failed ".
                                        "while attempting currentdump\n";
                            }                             }
                        } else {                         } else {
                            print $client "error: ".($!+0)                             print $client "error: ".($!+0)
        ." tie(GDBM) Failed\n";         ." tie(GDBM) Failed ".
                                         "while attempting currentdump\n";
                        }                         }
 # ------------------------------------------------------------------------ dump  # ------------------------------------------------------------------------ dump
                    } elsif ($userinput =~ /^dump/) {                     } elsif ($userinput =~ /^dump/) {
Line 1299  sub make_new_child { Line 1320  sub make_new_child {
                                print $client "$qresult\n";                                 print $client "$qresult\n";
                            } else {                             } else {
                                print $client "error: ".($!+0)                                 print $client "error: ".($!+0)
    ." untie(GDBM) Failed\n";     ." untie(GDBM) Failed ".
                                          "while attempting dump\n";
                            }                             }
                        } else {                         } else {
                            print $client "error: ".($!+0)                             print $client "error: ".($!+0)
        ." tie(GDBM) Failed\n";         ." tie(GDBM) Failed ".
                                         "while attempting dump\n";
                        }                         }
 # ----------------------------------------------------------------------- store  # ----------------------------------------------------------------------- store
                    } elsif ($userinput =~ /^store/) {                     } elsif ($userinput =~ /^store/) {
Line 1341  sub make_new_child { Line 1364  sub make_new_child {
                               print $client "ok\n";                                print $client "ok\n";
                            } else {                             } else {
                               print $client "error: ".($!+0)                                print $client "error: ".($!+0)
   ." untie(GDBM) Failed\n";    ." untie(GDBM) Failed ".
                                         "while attempting store\n";
                            }                             }
                        } else {                         } else {
                            print $client "error: ".($!+0)                             print $client "error: ".($!+0)
        ." tie(GDBM) Failed\n";         ." tie(GDBM) Failed ".
                                      "while attempting store\n";
                        }                         }
       } else {        } else {
                           print $client "refused\n";                            print $client "refused\n";
Line 1377  sub make_new_child { Line 1402  sub make_new_child {
                               print $client "$qresult\n";                                print $client "$qresult\n";
                            } else {                             } else {
                               print $client "error: ".($!+0)                                print $client "error: ".($!+0)
   ." untie(GDBM) Failed\n";    ." untie(GDBM) Failed ".
                                         "while attempting restore\n";
                            }                             }
                        } else {                         } else {
                            print $client "error: ".($!+0)                             print $client "error: ".($!+0)
        ." tie(GDBM) Failed\n";         ." tie(GDBM) Failed ".
                                      "while attempting restore\n";
                        }                         }
 # -------------------------------------------------------------------- chatsend  # -------------------------------------------------------------------- chatsend
                    } elsif ($userinput =~ /^chatsend/) {                     } elsif ($userinput =~ /^chatsend/) {
Line 1421  sub make_new_child { Line 1448  sub make_new_child {
        }         }
        else {         else {
    print $client "error: ".($!+0)     print $client "error: ".($!+0)
        ." IO::File->new Failed\n";         ." IO::File->new Failed ".
                                      "while attempting queryreply\n";
        }         }
 # ----------------------------------------------------------------------- idput  # ----------------------------------------------------------------------- idput
                    } elsif ($userinput =~ /^idput/) {                     } elsif ($userinput =~ /^idput/) {
Line 1446  sub make_new_child { Line 1474  sub make_new_child {
                               print $client "ok\n";                                print $client "ok\n";
                            } else {                             } else {
                               print $client "error: ".($!+0)                                print $client "error: ".($!+0)
   ." untie(GDBM) Failed\n";    ." untie(GDBM) Failed ".
                                         "while attempting idput\n";
                            }                             }
                        } else {                         } else {
                            print $client "error: ".($!+0)                             print $client "error: ".($!+0)
        ." tie(GDBM) Failed\n";         ." tie(GDBM) Failed ".
                                         "while attempting idput\n";
                        }                         }
 # ----------------------------------------------------------------------- idget  # ----------------------------------------------------------------------- idget
                    } elsif ($userinput =~ /^idget/) {                     } elsif ($userinput =~ /^idget/) {
Line 1469  sub make_new_child { Line 1499  sub make_new_child {
                               print $client "$qresult\n";                                print $client "$qresult\n";
                            } else {                             } else {
                               print $client "error: ".($!+0)                                print $client "error: ".($!+0)
   ." untie(GDBM) Failed\n";    ." untie(GDBM) Failed ".
                                         "while attempting idget\n";
                            }                             }
                        } else {                         } else {
                            print $client "error: ".($!+0)                             print $client "error: ".($!+0)
        ." tie(GDBM) Failed\n";         ." tie(GDBM) Failed ".
                                      "while attempting idget\n";
                        }                         }
 # ---------------------------------------------------------------------- tmpput  # ---------------------------------------------------------------------- tmpput
                    } elsif ($userinput =~ /^tmpput/) {                     } elsif ($userinput =~ /^tmpput/) {
Line 1491  sub make_new_child { Line 1523  sub make_new_child {
        }         }
        else {         else {
    print $client "error: ".($!+0)     print $client "error: ".($!+0)
        ."IO::File->new Failed\n";         ."IO::File->new Failed ".
                                      "while attempting tmpput\n";
        }         }
   
 # ---------------------------------------------------------------------- tmpget  # ---------------------------------------------------------------------- tmpget
Line 1508  sub make_new_child { Line 1541  sub make_new_child {
        }         }
        else {         else {
    print $client "error: ".($!+0)     print $client "error: ".($!+0)
        ."IO::File->new Failed\n";         ."IO::File->new Failed ".
                                      "while attempting tmpget\n";
        }         }
   
   # ---------------------------------------------------------------------- tmpdel
                      } elsif ($userinput =~ /^tmpdel/) {
                          my ($cmd,$id)=split(/:/,$userinput);
                          chomp($id);
                          $id=~s/\W/\_/g;
                          my $execdir=$perlvar{'lonDaemons'};
                          if (unlink("$execdir/tmp/$id.tmp")) {
      print $client "ok\n";
          } else {
      print $client "error: ".($!+0)
          ."Unlink tmp Failed ".
                                      "while attempting tmpdel\n";
          }
 # -------------------------------------------------------------------------- ls  # -------------------------------------------------------------------------- ls
                    } elsif ($userinput =~ /^ls/) {                     } elsif ($userinput =~ /^ls/) {
                        my ($cmd,$ulsdir)=split(/:/,$userinput);                         my ($cmd,$ulsdir)=split(/:/,$userinput);

Removed from v.1.109  
changed lines
  Added in v.1.112


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