From: | "Jeremy Olexa (darkside)" <darkside@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in sys-apps/sreadahead/files: sreadahead-pack.rc sreadahead.rc |
Date: | Fri, 23 Jan 2009 05:58:04 |
Message-Id: | E1LQF3E-0005lO-Hl@stork.gentoo.org |
1 | darkside 09/01/23 05:57:56 |
2 | |
3 | Added: sreadahead-pack.rc sreadahead.rc |
4 | Log: |
5 | Initial commit, ebuild by Anna Gabutero, bug 255724 |
6 | (Portage version: 2.2_rc23/cvs/Linux x86_64) |
7 | |
8 | Revision Changes Path |
9 | 1.1 sys-apps/sreadahead/files/sreadahead-pack.rc |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/sreadahead/files/sreadahead-pack.rc?rev=1.1&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/sreadahead/files/sreadahead-pack.rc?rev=1.1&content-type=text/plain |
13 | |
14 | Index: sreadahead-pack.rc |
15 | =================================================================== |
16 | #!/sbin/runscript |
17 | |
18 | # This script generates the sreadahead pack file, which lists the blocks that |
19 | # sreadahead should load into memory. |
20 | # To regenerate the pack file, delete /etc/readahead.packed and reboot the |
21 | # system. |
22 | |
23 | description="Generate sreadahead pack file (if it does not exist)" |
24 | |
25 | depend() { |
26 | after * |
27 | } |
28 | |
29 | start() { |
30 | if [ -f /etc/readahead.packed ] |
31 | then |
32 | return 0 |
33 | fi |
34 | |
35 | ebegin "Generating sreadahead pack file" |
36 | cd /tmp |
37 | find / \ |
38 | -path /home -prune -o \ |
39 | -path /tmp -prune -o \ |
40 | -path /var -prune -o \ |
41 | -path /proc -prune -o \ |
42 | -path /usr/portage -prune -o \ |
43 | -type f \( -fstype ext3 -o -fstype rootfs \) > \ |
44 | /tmp/readahead.packed.new |
45 | /sbin/sreadahead-pack readahead.packed.new &> /dev/null |
46 | mv readahead.packed /etc/readahead.packed |
47 | eend $? |
48 | } |
49 | |
50 | |
51 | |
52 | 1.1 sys-apps/sreadahead/files/sreadahead.rc |
53 | |
54 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/sreadahead/files/sreadahead.rc?rev=1.1&view=markup |
55 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/sreadahead/files/sreadahead.rc?rev=1.1&content-type=text/plain |
56 | |
57 | Index: sreadahead.rc |
58 | =================================================================== |
59 | #!/sbin/runscript |
60 | # Copyright 2009 Gentoo Foundation |
61 | # Distributed under the terms of the GNU General Public License v2 |
62 | # $Header: /var/cvsroot/gentoo-x86/sys-apps/sreadahead/files/sreadahead.rc,v 1.1 2009/01/23 05:57:56 darkside Exp $ |
63 | |
64 | description="Start sreadahead daemon" |
65 | |
66 | depend() { |
67 | need localmount |
68 | before clock bootmisc consolefont keymaps rmnologin serial urandom |
69 | } |
70 | |
71 | start() { |
72 | PACKFILE="/etc/readahead.packed" |
73 | |
74 | if ! [ -f $PACKFILE ] |
75 | then |
76 | ewarn "Cannot find sreadahead pack file $PACKFILE" |
77 | return 1 |
78 | fi |
79 | |
80 | ebegin "Starting sreadahead" |
81 | /sbin/sreadahead |
82 | eend $? |
83 | } |
84 | |
85 | # vim: ts=4 sw=4 |