From nbm@rucus.ru.ac.za Tue Aug  3 03:17:08 1999
Return-Path: <nbm@rucus.ru.ac.za>
Received: from rucus.ru.ac.za (rucus.ru.ac.za [146.231.29.2])
	by hub.freebsd.org (Postfix) with SMTP id 27F8C15082
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  3 Aug 1999 03:17:00 -0700 (PDT)
	(envelope-from nbm@rucus.ru.ac.za)
Received: (qmail 47210 invoked by uid 1003); 3 Aug 1999 10:17:12 -0000
Message-Id: <19990803101712.47209.qmail@rucus.ru.ac.za>
Date: 3 Aug 1999 10:17:12 -0000
From: nbm@rucus.ru.ac.za
Reply-To: nbm@rucus.ru.ac.za
To: FreeBSD-gnats-submit@freebsd.org
Subject: add flag to quota to suppress NFS quota checks
X-Send-Pr-Version: 3.2

>Number:         12939
>Category:       bin
>Synopsis:       add flag to quota to suppress NFS quota checks
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug  3 03:20:01 PDT 1999
>Closed-Date:    Thu Aug 08 17:55:57 PDT 2002
>Last-Modified:  Thu Aug 08 17:55:57 PDT 2002
>Originator:     Neil Blakey-Milner
>Release:        FreeBSD 3.0-STABLE i386
>Organization:
Rhodes University Computer Users' Society
>Environment:
FreeBSD rucus.ru.ac.za 3.0-STABLE FreeBSD 3.0-STABLE #0: Tue Feb  9 22:52:23 GMT 1999     grahams@rucus.ru.ac.za:/usr/src/sys/compile/RUCUS-SMP  i386

NFS environment

>Description:

Quota automatically checks NFS mounts, which can cause it to hang if
an NFS server is not available.  Since some admin like to put quota in
/etc/profile, and sometimes don't want the system to check NFS mounts,
it's probably a good idea to provide a mechanism to do that.

Check <Pine.BSF.4.10.9907232334490.1643-100000@chain.freebsd.os.org.za>,
from freebsd-questions, for example.

Also check open PR bin/6183 for another NFS/quota suggestion.

>How-To-Repeat:

mount filesystem via NFS
kill NFS server, or cut ethernet cable, or similar.
quota

>Fix:

--- quota.1.orig	Mon Aug  2 10:34:42 1999
+++ quota.1	Tue Aug  3 10:52:25 1999
@@ -43,14 +43,17 @@
 .Nd display disk usage and limits
 .Sh SYNOPSIS
 .Nm quota
+.Op Fl l
 .Op Fl g
 .Op Fl u
 .Op Fl v | Fl q
 .Nm quota
+.Op Fl l
 .Op Fl u
 .Op Fl v | Fl q
 .Ar user
 .Nm quota
+.Op Fl l
 .Op Fl g
 .Op Fl v | Fl q
 .Ar group
@@ -76,6 +79,10 @@
 Print a more terse message,
 containing only information
 on filesystems where usage is over quota.
+.It Fl l
+.Nm Quota
+will not report quotas on filesystems mounted via
+.Nm NFS .
 .El
 .Pp
 Specifying both
@@ -119,6 +126,13 @@
 .Nm
 exits with a non-zero status, one or more filesystems
 are over quota.
+.Pp
+If the
+.Fl l
+flag is specified,
+.Nm
+will not check filesystems mounted via
+.Nm NFS
 .Sh FILES
 .Bl -tag -width quota.group -compact
 .It Pa quota.user
--- quota.c.orig	Mon Aug  2 10:34:38 1999
+++ quota.c	Mon Aug  2 10:44:46 1999
@@ -107,6 +107,7 @@
 
 int	qflag;
 int	vflag;
+int	lflag;
 
 int
 main(argc, argv)
@@ -118,7 +119,7 @@
 	int i, gflag = 0, uflag = 0;
 	char ch;
 
-	while ((ch = getopt(argc, argv, "ugvq")) != -1) {
+	while ((ch = getopt(argc, argv, "ugvql")) != -1) {
 		switch(ch) {
 		case 'g':
 			gflag++;
@@ -132,6 +133,9 @@
 		case 'q':
 			qflag++;
 			break;
+		case 'l':
+			lflag++;
+			break;
 		default:
 			usage();
 		}
@@ -471,6 +475,8 @@
 				errx(2, "out of memory");
 		}
 		if (strcmp(fst[i].f_fstypename, "nfs") == 0) {
+			if (lflag)
+				continue;
 			if (getnfsquota(&fst[i], NULL, qup, id, quotatype)
 			    == 0)
 				continue;

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: iedowse 
State-Changed-When: Thu Aug 8 17:54:10 PDT 2002 
State-Changed-Why:  
Committed to -current. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=12939 
>Unformatted:
