[LON-CAPA-cvs] cvs: loncom / lond
banghart
lon-capa-cvs@mail.lon-capa.org
Fri, 27 Aug 2004 18:34:32 -0000
banghart Fri Aug 27 14:34:32 2004 EDT
Modified files:
/loncom lond
Log:
Added stub for disk usage information -- not working at all yet
just sneaking up on it
Index: loncom/lond
diff -u loncom/lond:1.242 loncom/lond:1.243
--- loncom/lond:1.242 Wed Aug 25 17:00:46 2004
+++ loncom/lond Fri Aug 27 14:34:31 2004
@@ -2,7 +2,7 @@
# The LearningOnline Network
# lond "LON Daemon" Server (port "LOND" 5663)
#
-# $Id: lond,v 1.242 2004/08/25 21:00:46 raeburn Exp $
+# $Id: lond,v 1.243 2004/08/27 18:34:31 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -57,7 +57,7 @@
my $status='';
my $lastlog='';
-my $VERSION='$Revision: 1.242 $'; #' stupid emacs
+my $VERSION='$Revision: 1.243 $'; #' stupid emacs
my $remoteVERSION;
my $currenthostid="default";
my $currentdomainid;
@@ -1282,6 +1282,34 @@
}
®ister_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 $obs;
+ my $rights;
+ my $uduout='';
+ my $udufn;
+ print $client "from lond not yet\n";
+ return 1;
+}
+®ister_handler("du", \&du_handler, 0, 1, 0);
@@ -1349,6 +1377,8 @@
®ister_handler("ls", \&ls_handler, 0, 1, 0);
+
+
# Process a reinit request. Reinit requests that either
# lonc or lond be reinitialized so that an updated
# host.tab or domain.tab can be processed.