1 |
Author: grobian |
2 |
Date: 2011-03-31 14:11:48 +0000 (Thu, 31 Mar 2011) |
3 |
New Revision: 1684 |
4 |
|
5 |
Modified: |
6 |
trunk/baselayout-prefix/sbin/rc-daemon.sh |
7 |
trunk/baselayout-prefix/sbin/rc-services.sh |
8 |
Log: |
9 |
applied baselayout-1.12.5-prefix-sh.patch |
10 |
|
11 |
Modified: trunk/baselayout-prefix/sbin/rc-daemon.sh |
12 |
=================================================================== |
13 |
--- trunk/baselayout-prefix/sbin/rc-daemon.sh 2011-03-31 14:11:36 UTC (rev 1683) |
14 |
+++ trunk/baselayout-prefix/sbin/rc-daemon.sh 2011-03-31 14:11:48 UTC (rev 1684) |
15 |
@@ -226,7 +226,7 @@ |
16 |
# We don't do anyting fancy - just pass the given options |
17 |
# to start-stop-daemon and return the value |
18 |
rc_start_daemon() { |
19 |
- eval /sbin/start-stop-daemon "${args}" |
20 |
+ eval @GENTOO_PORTAGE_EPREFIX@/sbin/start-stop-daemon "${args}" |
21 |
local retval="$?" |
22 |
|
23 |
[[ ${retval} != "0" ]] && return "${retval}" |
24 |
@@ -365,7 +365,7 @@ |
25 |
|
26 |
# We pass --oknodo and --test directly to start-stop-daemon and return |
27 |
if ${nothing}; then |
28 |
- eval /sbin/start-stop-daemon "${args}" |
29 |
+ eval @GENTOO_PORTAGE_EPREFIX@/sbin/start-stop-daemon "${args}" |
30 |
return "$?" |
31 |
fi |
32 |
|
33 |
|
34 |
Modified: trunk/baselayout-prefix/sbin/rc-services.sh |
35 |
=================================================================== |
36 |
--- trunk/baselayout-prefix/sbin/rc-services.sh 2011-03-31 14:11:36 UTC (rev 1683) |
37 |
+++ trunk/baselayout-prefix/sbin/rc-services.sh 2011-03-31 14:11:48 UTC (rev 1684) |
38 |
@@ -8,9 +8,9 @@ |
39 |
|
40 |
if [[ ${RC_GOT_DEPTREE_INFO} != "yes" ]] ; then |
41 |
# Only try and update if we are root |
42 |
- if [[ ${EUID} == "0" ]] && ! /sbin/depscan.sh ; then |
43 |
+ if [[ ${EUID} == "0" ]] && ! @GENTOO_PORTAGE_EPREFIX@/sbin/depscan.sh ; then |
44 |
echo |
45 |
- eerror "Error running '/sbin/depscan.sh'!" |
46 |
+ eerror "Error running '@GENTOO_PORTAGE_EPREFIX@/sbin/depscan.sh'!" |
47 |
eerror "Please correct any problems above." |
48 |
exit 1 |
49 |
fi |
50 |
@@ -19,7 +19,7 @@ |
51 |
if [[ ${RC_GOT_DEPTREE_INFO} != "yes" ]] ; then |
52 |
echo |
53 |
eerror "Dependency info is missing! Please run" |
54 |
- eerror " # /sbin/depscan.sh" |
55 |
+ eerror " # @GENTOO_PORTAGE_EPREFIX@/sbin/depscan.sh" |
56 |
eerror "to fix this." |
57 |
exit 1 |
58 |
fi |
59 |
@@ -134,7 +134,7 @@ |
60 |
if ! get_dep_info "${myservice}" >/dev/null ; then |
61 |
eerror "Could not get dependency info for ${myservice}!" > /dev/stderr |
62 |
eerror "Please run:" > /dev/stderr |
63 |
- eerror " # /sbin/depscan.sh" > /dev/stderr |
64 |
+ eerror " # @GENTOO_PORTAGE_EPREFIX@/sbin/depscan.sh" > /dev/stderr |
65 |
eerror "to try and fix this." > /dev/stderr |
66 |
return 1 |
67 |
fi |
68 |
@@ -212,11 +212,11 @@ |
69 |
|
70 |
[[ -z $1 || -z $2 ]] && return 1 |
71 |
|
72 |
- [[ $2 != "${BOOTLEVEL}" && -e /etc/runlevels/"${BOOTLEVEL}"/.fake ]] && \ |
73 |
- fake_services="$( < /etc/runlevels/"${BOOTLEVEL}"/.fake )" |
74 |
+ [[ $2 != "${BOOTLEVEL}" && -e @GENTOO_PORTAGE_EPREFIX@/etc/runlevels/"${BOOTLEVEL}"/.fake ]] && \ |
75 |
+ fake_services="$( < @GENTOO_PORTAGE_EPREFIX@/etc/runlevels/"${BOOTLEVEL}"/.fake )" |
76 |
|
77 |
- [[ -e /etc/runlevels/"$2"/.fake ]] && \ |
78 |
- fake_services="${fake_services} $( < /etc/runlevels/"$2"/.fake )" |
79 |
+ [[ -e @GENTOO_PORTAGE_EPREFIX@/etc/runlevels/"$2"/.fake ]] && \ |
80 |
+ fake_services="${fake_services} $( < @GENTOO_PORTAGE_EPREFIX@/etc/runlevels/"$2"/.fake )" |
81 |
|
82 |
for x in ${fake_services} ; do |
83 |
[[ $1 == "${x##*/}" ]] && return 0 |
84 |
@@ -232,7 +232,7 @@ |
85 |
in_runlevel() { |
86 |
[[ -z $1 || -z $2 ]] && return 1 |
87 |
|
88 |
- [[ -L "/etc/runlevels/$2/$1" ]] && return 0 |
89 |
+ [[ -L "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/$2/$1" ]] && return 0 |
90 |
|
91 |
return 1 |
92 |
} |
93 |
@@ -385,7 +385,7 @@ |
94 |
local service="$1" |
95 |
[[ -z ${service} ]] && return 1 |
96 |
|
97 |
- if [[ ! -e "/etc/init.d/${service}" ]] ; then |
98 |
+ if [[ ! -e "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service}" ]] ; then |
99 |
mark_service_stopped "${service}" |
100 |
return 1 |
101 |
fi |
102 |
@@ -408,8 +408,8 @@ |
103 |
# if we can not start the services in parallel |
104 |
# then just start it and return the exit status |
105 |
( |
106 |
- profiling name "/etc/init.d/${service} start" |
107 |
- "/etc/init.d/${service}" start |
108 |
+ profiling name "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service} start" |
109 |
+ "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service}" start |
110 |
) |
111 |
|
112 |
service_started "${service}" || service_inactive "${service}" \ |
113 |
@@ -423,8 +423,8 @@ |
114 |
else |
115 |
# if parallel startup is allowed, start it in background |
116 |
( |
117 |
- profiling name "/etc/init.d/${service} start" |
118 |
- "/etc/init.d/${service}" start |
119 |
+ profiling name "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service} start" |
120 |
+ "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service}" start |
121 |
|
122 |
service_started "${service}" || service_inactive "${service}" \ |
123 |
|| service_scheduled "${service}" |
124 |
@@ -445,7 +445,7 @@ |
125 |
local service="$1" |
126 |
[[ -z ${service} ]] && return 1 |
127 |
|
128 |
- if [[ ! -e "/etc/init.d/${service}" ]] ; then |
129 |
+ if [[ ! -e "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service}" ]] ; then |
130 |
mark_service_stopped "${service}" |
131 |
return 0 |
132 |
fi |
133 |
@@ -470,7 +470,7 @@ |
134 |
${STOP_CRITICAL} == "yes" ]] ; then |
135 |
# if we can not start the services in parallel |
136 |
# then just start it and return the exit status |
137 |
- ( "/etc/init.d/${service}" stop ) |
138 |
+ ( "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service}" stop ) |
139 |
service_stopped "${service}" |
140 |
retval=$? |
141 |
end_service "${service}" "${retval}" |
142 |
@@ -479,7 +479,7 @@ |
143 |
else |
144 |
# if parallel startup is allowed, start it in background |
145 |
( |
146 |
- ( "/etc/init.d/${service}" stop ) |
147 |
+ ( "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/${service}" stop ) |
148 |
service_stopped "${service}" |
149 |
retval=$? |
150 |
end_service "${service}" "${retval}" |
151 |
@@ -496,7 +496,7 @@ |
152 |
mark_service_coldplugged() { |
153 |
[[ -z $1 ]] && return 1 |
154 |
|
155 |
- ln -snf "/etc/init.d/$1" "${svcdir}/coldplugged/$1" |
156 |
+ ln -snf "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/$1" "${svcdir}/coldplugged/$1" |
157 |
return 0 |
158 |
} |
159 |
|
160 |
@@ -507,7 +507,7 @@ |
161 |
mark_service_starting() { |
162 |
[[ -z $1 ]] && return 1 |
163 |
|
164 |
- ln -sn "/etc/init.d/$1" "${svcdir}/starting/$1" 2>/dev/null || return 1 |
165 |
+ ln -sn "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/$1" "${svcdir}/starting/$1" 2>/dev/null || return 1 |
166 |
|
167 |
[[ -f "${svcdir}/started/$1" ]] && rm -f "${svcdir}/started/$1" |
168 |
[[ -f "${svcdir}/inactive/$1" ]] \ |
169 |
@@ -522,7 +522,7 @@ |
170 |
mark_service_started() { |
171 |
[[ -z $1 ]] && return 1 |
172 |
|
173 |
- ln -snf "/etc/init.d/$1" "${svcdir}/started/$1" |
174 |
+ ln -snf "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/$1" "${svcdir}/started/$1" |
175 |
|
176 |
rm -f "${svcdir}/starting/$1" "${svcdir}/inactive/$1" \ |
177 |
"${svcdir}/wasinactive/$1" "${svcdir}/stopping/$1" \ |
178 |
@@ -538,7 +538,7 @@ |
179 |
mark_service_inactive() { |
180 |
[[ -z $1 ]] && return 1 |
181 |
|
182 |
- ln -snf "/etc/init.d/$1" "${svcdir}/inactive/$1" |
183 |
+ ln -snf "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/$1" "${svcdir}/inactive/$1" |
184 |
|
185 |
rm -f "${svcdir}/started/$1" "${svcdir}/wasinactive/$1" \ |
186 |
"${svcdir}/starting/$1" "${svcdir}/stopping/$1" |
187 |
@@ -553,7 +553,7 @@ |
188 |
mark_service_stopping() { |
189 |
[[ -z $1 ]] && return 1 |
190 |
|
191 |
- ln -sn "/etc/init.d/$1" "${svcdir}/stopping/$1" 2>/dev/null || return 1 |
192 |
+ ln -sn "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/$1" "${svcdir}/stopping/$1" 2>/dev/null || return 1 |
193 |
|
194 |
rm -f "${svcdir}/started/$1" |
195 |
[[ -f "${svcdir}/inactive/$1" ]] \ |
196 |
@@ -690,7 +690,7 @@ |
197 |
mark_service_failed() { |
198 |
[[ -z $1 || ! -d "${svcdir}/failed" ]] && return 1 |
199 |
|
200 |
- ln -snf "/etc/init.d/$1" "${svcdir}/failed/$1" |
201 |
+ ln -snf "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/$1" "${svcdir}/failed/$1" |
202 |
} |
203 |
|
204 |
# bool service_failed(service) |
205 |
@@ -744,8 +744,8 @@ |
206 |
return $? |
207 |
;; |
208 |
yes) |
209 |
- for x in $(dolisting "/etc/runlevels/${BOOTLEVEL}/net.*") \ |
210 |
- $(dolisting "/etc/runlevels/${SOFTLEVEL}/net.*") ; do |
211 |
+ for x in $(dolisting "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${BOOTLEVEL}/net.*") \ |
212 |
+ $(dolisting "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${SOFTLEVEL}/net.*") ; do |
213 |
local y="${x##*/}" |
214 |
[[ ${y} == "$1" ]] && return 1 |
215 |
service_started "${y}" || return 1 |
216 |
@@ -785,8 +785,8 @@ |
217 |
[[ -f "${svcdir}/softlevel" ]] && mylevel=$( < "${svcdir}/softlevel" ) |
218 |
|
219 |
for x in $( i$1 "$2" ) ; do |
220 |
- [[ -e "/etc/runlevels/${BOOTLEVEL}/${x}" || \ |
221 |
- -e "/etc/runlevels/${mylevel}/${x}" || \ |
222 |
+ [[ -e "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${BOOTLEVEL}/${x}" || \ |
223 |
+ -e "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${mylevel}/${x}" || \ |
224 |
${x} == "net" ]] \ |
225 |
&& valid="${valid} ${x}" |
226 |
done |
227 |
@@ -836,9 +836,9 @@ |
228 |
net_services="${net_services} ${x##*/}" |
229 |
done |
230 |
else |
231 |
- for x in $(dolisting "/etc/runlevels/${BOOTLEVEL}/net.*") \ |
232 |
- $(dolisting "/etc/runlevels/${SOFTLEVEL}/net.*") \ |
233 |
- $(dolisting "/etc/runlevels/coldplugged/net.*") ; do |
234 |
+ for x in $(dolisting "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${BOOTLEVEL}/net.*") \ |
235 |
+ $(dolisting "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/${SOFTLEVEL}/net.*") \ |
236 |
+ $(dolisting "@GENTOO_PORTAGE_EPREFIX@/etc/runlevels/coldplugged/net.*") ; do |
237 |
net_services="${net_services} ${x##*/}" |
238 |
done |
239 |
fi |