Gentoo Archives: gentoo-dev

From: Gregg <gregg@××.am>
To: smiler@××××××××××.nu
Cc: gentoo-dev@g.o
Subject: Re: [gentoo-dev] my quota startup script
Date: Thu, 25 Jul 2002 12:30:35
Message-Id: 1026.12.247.253.40.1027618324.squirrel@sc.am
In Reply to: Re: [gentoo-dev] my quota startup script by Christian Axelsson
1 Oops. Yeah I missed that one in the paste. I have it fixed locally.
2
3 Gregg
4
5
6 > Hmm... why do you have a 'need net' dependency?
7 >
8 > I have attached mine I use.
9 >
10 > BOF
11 > depend() {
12 > need localmount
13 > }
14 >
15 > start() {
16 > if [ -x /sbin/quotacheck ]
17 > then
18 > ebegin "Checking quotas. This may take some time."
19 > /sbin/quotacheck -avug
20 > eend $?
21 > fi
22 > if [ -x /sbin/quotaon ]
23 > then
24 > ebegin "Turning on quota."
25 > /sbin/quotaon -avug
26 > eend $?
27 > fi
28 > }
29 >
30 > stop() {
31 > if [ -x /sbin/quotaon ]
32 > then
33 > ebegin "Turning off quota."
34 > /sbin/quotaoff
35 > eend $?
36 > fi
37 > }
38 > EOF
39 >
40 >
41 > --
42 > Christian Axelsson
43 > smiler@××××××××××.nu
44 >
45 > --------------------
46 > On Thu, 25 Jul 2002 10:17:30 -0500 (CDT)
47 > "Gregg" <gregg@××.am> wrote:
48 >
49 >> This is my startup script for quota. It runs from the "boot"
50 >> runlevel. This turns quotas on and does the initial check at boot.
51 >> Then on shutdown/reboot turns it off. I think maybe it could go in
52 >> the package for quota?
53 >>
54 >> #!/sbin/runscript
55 >>
56 >> depend() {
57 >> need net
58 >> }
59 >>
60 >> start() {
61 >> ebegin "Starting Quota"
62 >> if [ -x /sbin/quotacheck ]
63 >> then
64 >> echo "Checking quotas. This make take some time."
65 >> /sbin/quotacheck -avug
66 >> echo "Done."
67 >> fi
68 >> if [ -x /sbin/quotaon ]
69 >> then
70 >> echo "Turning on quota"
71 >> /sbin/quotaon -avug
72 >> fi
73 >> eend $?
74 >> }
75 >>
76 >> stop() {
77 >> ebegin "Stopping quota"
78 >> if [ -x /sbin/quotaoff ]
79 >> then
80 >> echo "Turning quota off"
81 >> /sbin/quotaoff -avug
82 >> fi
83 >> eend $?
84 >> }
85 > _______________________________________________
86 > gentoo-dev mailing list
87 > gentoo-dev@g.o
88 > http://lists.gentoo.org/mailman/listinfo/gentoo-dev