From: | "Wolfram Schlich (wschlich)" <wschlich@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in sys-block/spindown/files: spindownd.confd spindown-0.2.2-CFLAGS.patch spindownd.initd |
Date: | Fri, 21 Nov 2008 18:18:07 |
Message-Id: | E1L3aZt-00049t-QT@stork.gentoo.org |
1 | wschlich 08/11/21 18:18:01 |
2 | |
3 | Added: spindownd.confd spindown-0.2.2-CFLAGS.patch |
4 | spindownd.initd |
5 | Log: |
6 | initial import |
7 | (Portage version: 2.2_rc13/cvs/Linux 2.6.24-gentoo-r5-1 i686) |
8 | |
9 | Revision Changes Path |
10 | 1.1 sys-block/spindown/files/spindownd.confd |
11 | |
12 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/spindown/files/spindownd.confd?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/spindown/files/spindownd.confd?rev=1.1&content-type=text/plain |
14 | |
15 | Index: spindownd.confd |
16 | =================================================================== |
17 | # spindownd config file |
18 | # default: /etc/spindown.conf |
19 | #SPINDOWND_CFG=/etc/spindown.conf |
20 | |
21 | # spindownd lockfile |
22 | # default: /var/lock/spindown.lock |
23 | #SPINDOWND_LOCK=/var/lock/spindown.lock |
24 | |
25 | # spindownd fifo |
26 | # default: /var/run/spindown.fifo |
27 | #SPINDOWND_FIFO=/var/run/spindown.fifo |
28 | |
29 | # extra options for spindownd |
30 | #SPINDOWND_OPTS="" # you must NOT use -c or -f here! |
31 | |
32 | |
33 | |
34 | 1.1 sys-block/spindown/files/spindown-0.2.2-CFLAGS.patch |
35 | |
36 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/spindown/files/spindown-0.2.2-CFLAGS.patch?rev=1.1&view=markup |
37 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/spindown/files/spindown-0.2.2-CFLAGS.patch?rev=1.1&content-type=text/plain |
38 | |
39 | Index: spindown-0.2.2-CFLAGS.patch |
40 | =================================================================== |
41 | diff -urN spindown-0.2.2.orig/Makefile spindown-0.2.2/Makefile |
42 | --- spindown-0.2.2.orig/Makefile 2008-09-08 14:36:01.000000000 +0200 |
43 | +++ spindown-0.2.2/Makefile 2008-11-21 18:52:39.011908499 +0100 |
44 | @@ -3,7 +3,7 @@ |
45 | VERSION = 0.2.2 |
46 | OBJS = diskset.o disk.o thread.o spindown.o iniparser.o dictionary.o log.o |
47 | CC = g++ |
48 | -CFLAGS =-O1 -pthread |
49 | +CFLAGS += -pthread |
50 | SRC = src/ |
51 | INPARSER = $(SRC)ininiparser3.0b/ |
52 | |
53 | |
54 | |
55 | |
56 | 1.1 sys-block/spindown/files/spindownd.initd |
57 | |
58 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/spindown/files/spindownd.initd?rev=1.1&view=markup |
59 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-block/spindown/files/spindownd.initd?rev=1.1&content-type=text/plain |
60 | |
61 | Index: spindownd.initd |
62 | =================================================================== |
63 | #!/sbin/runscript |
64 | # Copyright 1999-2008 Gentoo Foundation |
65 | # Distributed under the terms of the GNU General Public License v2 |
66 | |
67 | SPINDOWND_BIN="/usr/sbin/spindownd" |
68 | SPINDOWND_CFG=${SPINDOWND_CFG:-/etc/spindown.conf} |
69 | SPINDOWND_LOCK=${SPINDOWND_LOCK:-/var/lock/spindown.lock} |
70 | SPINDOWND_FIFO=${SPINDOWND_FIFO:-/var/run/spindown.fifo} |
71 | |
72 | opts="reload" |
73 | |
74 | depend() { |
75 | need localmount |
76 | after bootmisc |
77 | } |
78 | |
79 | checkconfig() { |
80 | # check for config file |
81 | if [ ! -e "${SPINDOWND_CFG}" ]; then |
82 | eerror |
83 | eerror "The spindownd config file (${SPINDOWND_CFG})" |
84 | eerror "is missing!" |
85 | eerror |
86 | return 1 |
87 | fi |
88 | # check for leftover lockfile |
89 | if [ -f "${SPINDOWND_LOCK}" ]; then |
90 | ewarn |
91 | ewarn "The spindownd lockfile (${SPINDOWND_LOCK})" |
92 | ewarn "exists although the service is not marked as started." |
93 | ewarn "Will remove the lockfile and start the service in 10s" |
94 | ewarn "if not interrupted..." |
95 | ewarn |
96 | sleep 10 |
97 | if ! rm -f "${SPINDOWND_LOCK}"; then |
98 | eerror "Failed to remove the spindownd lockfile (${SPINDOWND_LOCK})" |
99 | return 1 |
100 | fi |
101 | fi |
102 | } |
103 | |
104 | start() { |
105 | checkconfig || return 1 |
106 | ebegin "Starting spindownd" |
107 | start-stop-daemon --start --exec ${SPINDOWND_BIN} \ |
108 | -- -c ${SPINDOWND_CFG} -f ${SPINDOWND_FIFO} ${SPINDOWND_OPTS} |
109 | eend $? |
110 | } |
111 | |
112 | stop() { |
113 | ebegin "Stopping spindownd" |
114 | start-stop-daemon --stop --exec ${SPINDOWND_BIN} |
115 | eend $? |
116 | } |
117 | |
118 | reload() { |
119 | ebegin "Reloading spindownd configuration" |
120 | start-stop-daemon --stop --exec ${SPINDOWND_BIN} \ |
121 | --signal HUP |
122 | eend $? |
123 | } |