[LON-CAPA-cvs] cvs: loncom / lond

banghart lon-capa-cvs@mail.lon-capa.org
Sat, 28 Aug 2004 15:52:51 -0000


banghart		Sat Aug 28 11:52:51 2004 EDT

  Modified files:              
    /loncom	lond 
  Log:
  
  	A step closer, still not done
  
  
Index: loncom/lond
diff -u loncom/lond:1.243 loncom/lond:1.244
--- loncom/lond:1.243	Fri Aug 27 14:34:31 2004
+++ loncom/lond	Sat Aug 28 11:52:51 2004
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.243 2004/08/27 18:34:31 banghart Exp $
+# $Id: lond,v 1.244 2004/08/28 15:52:51 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -57,7 +57,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.243 $'; #' stupid emacs
+my $VERSION='$Revision: 1.244 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -1299,20 +1299,20 @@
 # Side Effects:
 #   The reply is written to  $client.
 #
+
 sub du_handler {
     my ($cmd, $ududir, $client) = @_;
     my $userinput = "$cmd:$ududir";
-    my $obs;
-    my $rights;
-    my $uduout='';
-    my $udufn;
-    print $client "from lond not yet\n";
+    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);
 
 
-
 #
 #   ls  - list the contents of a directory.  For each file in the
 #    selected directory the filename followed by the full output of