1 |
darkside 08/10/28 02:02:14 |
2 |
|
3 |
Modified: init.d-preload conf.d-preload |
4 |
Log: |
5 |
sys-app/preload - fix init script (see ChangeLog for details) |
6 |
(Portage version: 2.2_rc12/cvs/Linux 2.6.27-git6 x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.5 sys-apps/preload/files/init.d-preload |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/preload/files/init.d-preload?rev=1.5&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/preload/files/init.d-preload?rev=1.5&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/preload/files/init.d-preload?r1=1.4&r2=1.5 |
14 |
|
15 |
Index: init.d-preload |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/preload/files/init.d-preload,v |
18 |
retrieving revision 1.4 |
19 |
retrieving revision 1.5 |
20 |
diff -u -r1.4 -r1.5 |
21 |
--- init.d-preload 24 Oct 2008 01:38:43 -0000 1.4 |
22 |
+++ init.d-preload 28 Oct 2008 02:02:14 -0000 1.5 |
23 |
@@ -1,29 +1,29 @@ |
24 |
#!/sbin/runscript |
25 |
# Copyright 1999-2008 Gentoo Foundation |
26 |
# Distributed under the terms of the GNU General Public License v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/preload/files/init.d-preload,v 1.4 2008/10/24 01:38:43 darkside Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/preload/files/init.d-preload,v 1.5 2008/10/28 02:02:14 darkside Exp $ |
29 |
|
30 |
depend() { |
31 |
after localmount xdm |
32 |
} |
33 |
|
34 |
-# Note: pid changes so we can't use a PIDFILE type thing. |
35 |
start() { |
36 |
ebegin "Starting preload" |
37 |
- start-stop-daemon --start --quiet --exec /usr/sbin/preload -- \ |
38 |
+ start-stop-daemon --start --quiet --background \ |
39 |
+ --make-pidfile --pidfile ${PIDFILE} --exec /usr/sbin/preload -- \ |
40 |
-l ${PRELOAD_LOGFILE:-/var/log/preload.log} -V ${PRELOAD_VERBOSITY:-4} \ |
41 |
- -n ${PRELOAD_NICE:-15} -s ${PRELOAD_STATEFILE:-""} |
42 |
+ -n ${PRELOAD_NICE:-15} -s ${PRELOAD_STATEFILE:-""} -f |
43 |
|
44 |
- IONICE=$(type -p ionice) |
45 |
- if [[ -x "${IONICE}" && -n "${IONICE_OPTS}" ]]; then |
46 |
- einfo "ionice'ing preload" |
47 |
- ${IONICE} "${IONICE_OPTS}" -p $(pidof preload) |
48 |
+ IONICE="$(command -v ionice)" |
49 |
+ if [ -x "${IONICE}" -a -n "${IONICE_OPTS}" ]; then |
50 |
+ einfo "ionicing preload" |
51 |
+ "${IONICE}" "${IONICE_OPTS}" -p $(<${PIDFILE}) |
52 |
fi |
53 |
eend $? |
54 |
} |
55 |
|
56 |
stop() { |
57 |
- ebegin "Stopping preload" |
58 |
- start-stop-daemon --stop --quiet --exec /usr/sbin/preload |
59 |
+ ebegin "Stopping preload (may take awhile)" |
60 |
+ start-stop-daemon --stop --retry 120 --quiet --pidfile ${PIDFILE} |
61 |
eend $? |
62 |
} |
63 |
|
64 |
|
65 |
|
66 |
1.6 sys-apps/preload/files/conf.d-preload |
67 |
|
68 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/preload/files/conf.d-preload?rev=1.6&view=markup |
69 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/preload/files/conf.d-preload?rev=1.6&content-type=text/plain |
70 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/preload/files/conf.d-preload?r1=1.5&r2=1.6 |
71 |
|
72 |
Index: conf.d-preload |
73 |
=================================================================== |
74 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/preload/files/conf.d-preload,v |
75 |
retrieving revision 1.5 |
76 |
retrieving revision 1.6 |
77 |
diff -u -r1.5 -r1.6 |
78 |
--- conf.d-preload 24 Oct 2008 01:38:43 -0000 1.5 |
79 |
+++ conf.d-preload 28 Oct 2008 02:02:14 -0000 1.6 |
80 |
@@ -1,8 +1,10 @@ |
81 |
# Copyright 1999-2008 Gentoo Foundation |
82 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/preload/files/conf.d-preload,v 1.5 2008/10/24 01:38:43 darkside Exp $ |
83 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/preload/files/conf.d-preload,v 1.6 2008/10/28 02:02:14 darkside Exp $ |
84 |
# preload configuration file |
85 |
|
86 |
-# verbosity. 0-9, Default is 4. |
87 |
+PIDFILE="/var/run/preload.pid" |
88 |
+ |
89 |
+# verbosity. 0-10, Default is 4. |
90 |
#PRELOAD_VERBOSITY="4" |
91 |
|
92 |
# set this for niceness. Default is 15. Valid ranges are from -20 to 19. See |