Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 5564 - quota rc script
Summary: quota rc script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Joachim Blaabjerg (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-25 10:20 UTC by Gregg
Modified: 2003-02-04 19:42 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gregg 2002-07-25 10:20:38 UTC
This is my startup script for quota.  It runs from the "boot" runlevel.  This
turns quotas on and does the initial check at boot.  Then on shutdown/reboot
turns it off.  I think maybe it could go in the package for quota?

#!/sbin/runscript

depend() {
	need net
}

start() {
	ebegin "Starting Quota"
	if [ -x /sbin/quotacheck ]
	then
		echo "Checking quotas. This make take some time."
		/sbin/quotacheck -avug
		echo "Done."
	fi
	if [ -x /sbin/quotaon ]
		then
			echo "Turning on quota"
			/sbin/quotaon -avug
	fi
	eend $?
}

stop() {
	ebegin "Stopping quota"
	if [ -x /sbin/quotaoff ]
		then
			echo "Turning quota off"
			/sbin/quotaoff -avug
	fi
	eend $?
}
Comment 1 SpanKY gentoo-dev 2002-07-25 21:06:58 UTC
why does this need net ?
Comment 2 Gregg 2002-07-25 21:25:51 UTC
Sorry the script should have need localmount , not net
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-08 15:58:20 UTC
Joachim, script looks out of syntax perspective ok if you add the fix in
comment #2, check if it works ok, and maybe add ?
Comment 4 Joachim Blaabjerg (RETIRED) gentoo-dev 2002-12-09 02:45:14 UTC
Committed. I bumped it to -r1 and ~ masked on all platforms as well, might have 
been a little overkill.  
 
What bothers me about this script, is that I've found no really good way of killing 
quota{on,off}'s output. I'll gladly take a look at the source and make it use a more 
reasonable output function if it's wanted. :)