<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1255" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18852">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Hello</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Well I had several options:</FONT></DIV>
<DIV><FONT size=2 face=Arial>1. write a cron-job that will email users if they
are above quota threshold</FONT></DIV>
<DIV><FONT size=2 face=Arial>2. write a login shell that will report the quota
& exit</FONT></DIV>
<DIV><FONT size=2 face=Arial>3. write some cgi script that will allow user via
dynamic web page to check his quota</FONT></DIV>
<DIV><FONT size=2 face=Arial>4. write a cron-job that creates a web page that
display the quota for all SVN projects (and that what I did)</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>and here it is with minor changes</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>#!/bin/bash</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>out=quota.html</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>function my_quota()<BR>{<BR>
q=`quota -g $2 | tail -1 -`</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial> b=`echo $q | awk '{print ($2) }'
-`<BR> l=`echo $q | awk '{print ($3) }'
-`<BR> hl=`echo $q | awk '{print ($4) }'
-`<BR> g=`echo $q | awk '{print ($5) }' -`</FONT></DIV>
<DIV><FONT size=2 face=Arial><BR> echo "<tr
align=\"right\"><td>$1</td><td>$b</td><td>$l</td><td>$hl</td><td>$g</td></tr>"
>> $out<BR>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>echo -e
"<HTML>\n<HEAD>\n\t<title>cs234311 SVN
quota</title>\n</HEAD>\n\n<BODY>\n<table width=\"40%\">"
> $out<BR>echo "<tr
align=\"right\"><td>group</td><td>blocks</td><td>quota</td><td>limit</td><td>grace</td></tr>"
>> $out</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>my_quota 1 g1<BR>my_quota 2 g2<BR></FONT></DIV>
<DIV><FONT size=2 face=Arial>echo -e
"\n</table>\n</BODY>\n</HEAD>" >> $out</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>chmod 644 $out</FONT></DIV>
<DIV><FONT size=2 face=Arial># end of script</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Shahar</DIV>
<DIV><BR></DIV></FONT>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=dag@cs.technion.ac.il href="mailto:dag@cs.technion.ac.il">Shahar
Dag</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=haifux@haifux.org
href="mailto:haifux@haifux.org">Haifaux</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, January 18, 2010 9:25
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Haifux] SVN quota</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2 face=Arial>Hello</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I have a LINUX server (RHE 4) that among other
things serves as SVN server (the SVN server runs over apache).</FONT></DIV>
<DIV><FONT size=2 face=Arial>Users can access their repository via https, but
they can't login to the server (not even with ssh).</FONT></DIV>
<DIV><FONT size=2 face=Arial>To access the SVN, users must supply their NIS
user name & password.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Every SVN repository has it's own quota
limitation.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>The question is: do SVN users have any way
to test their quota?</FONT></DIV>
<DIV><FONT size=2 face=Arial>(I don't want to write a cron job that
warns the users when they are over 80% of the quota)</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Thanks</FONT></DIV>
<DIV><FONT size=2 face=Arial>Shahar</FONT></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Haifux mailing
list<BR>Haifux@haifux.org<BR>http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux<BR></BLOCKQUOTE></BODY></HTML>