1 |
williamh 12/11/30 19:17:52 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: openrc-0.11.6.ebuild |
5 |
Log: |
6 |
This fixes #443996 and #445116. |
7 |
Also, we now unmount /usr if it was not pre-mounted by an initramfs on |
8 |
Linux systems. |
9 |
I am taking this to stable on all arches where 0.11.5 was stable because |
10 |
these issues were not reported to me until we started stabilizing. |
11 |
|
12 |
(Portage version: 2.2.0_alpha143/cvs/Linux i686, RepoMan options: --force, signed Manifest commit with key 0x30C46538) |
13 |
|
14 |
Revision Changes Path |
15 |
1.247 sys-apps/openrc/ChangeLog |
16 |
|
17 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/openrc/ChangeLog?rev=1.247&view=markup |
18 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/openrc/ChangeLog?rev=1.247&content-type=text/plain |
19 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/openrc/ChangeLog?r1=1.246&r2=1.247 |
20 |
|
21 |
Index: ChangeLog |
22 |
=================================================================== |
23 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v |
24 |
retrieving revision 1.246 |
25 |
retrieving revision 1.247 |
26 |
diff -u -r1.246 -r1.247 |
27 |
--- ChangeLog 25 Nov 2012 06:12:19 -0000 1.246 |
28 |
+++ ChangeLog 30 Nov 2012 19:17:52 -0000 1.247 |
29 |
@@ -1,6 +1,15 @@ |
30 |
# ChangeLog for sys-apps/openrc |
31 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
32 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.246 2012/11/25 06:12:19 williamh Exp $ |
33 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.247 2012/11/30 19:17:52 williamh Exp $ |
34 |
+ |
35 |
+*openrc-0.11.6 (30 Nov 2012) |
36 |
+ |
37 |
+ 30 Nov 2012; William Hubbs <williamh@g.o> +openrc-0.11.6.ebuild: |
38 |
+ This fixes #443996 and #445116. |
39 |
+ Also, we now unmount /usr if it was not pre-mounted by an initramfs on |
40 |
+ Linux systems. |
41 |
+ I am taking this to stable on all arches where 0.11.5 was stable because |
42 |
+ these issues were not reported to me until we started stabilizing. |
43 |
|
44 |
25 Nov 2012; William Hubbs <williamh@g.o> ChangeLog: |
45 |
sign manifest; the previous commit was mine as well. signing was not |
46 |
|
47 |
|
48 |
|
49 |
1.1 sys-apps/openrc/openrc-0.11.6.ebuild |
50 |
|
51 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/openrc/openrc-0.11.6.ebuild?rev=1.1&view=markup |
52 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/openrc/openrc-0.11.6.ebuild?rev=1.1&content-type=text/plain |
53 |
|
54 |
Index: openrc-0.11.6.ebuild |
55 |
=================================================================== |
56 |
# Copyright 1999-2012 Gentoo Foundation |
57 |
# Distributed under the terms of the GNU General Public License v2 |
58 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/openrc-0.11.6.ebuild,v 1.1 2012/11/30 19:17:52 williamh Exp $ |
59 |
|
60 |
EAPI=4 |
61 |
|
62 |
inherit eutils flag-o-matic multilib pam toolchain-funcs |
63 |
|
64 |
DESCRIPTION="OpenRC manages the services, startup and shutdown of a host" |
65 |
HOMEPAGE="http://www.gentoo.org/proj/en/base/openrc/" |
66 |
|
67 |
if [[ ${PV} == "9999" ]]; then |
68 |
EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/${PN}.git" |
69 |
inherit git-2 |
70 |
else |
71 |
SRC_URI="http://dev.gentoo.org/~williamh/dist/${P}.tar.bz2" |
72 |
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
73 |
fi |
74 |
|
75 |
LICENSE="BSD-2" |
76 |
SLOT="0" |
77 |
IUSE="debug elibc_glibc ncurses pam newnet prefix selinux static-libs unicode |
78 |
kernel_linux kernel_FreeBSD" |
79 |
|
80 |
RDEPEND="virtual/init |
81 |
kernel_FreeBSD? ( || ( >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd ) ) |
82 |
elibc_glibc? ( >=sys-libs/glibc-2.5 ) |
83 |
ncurses? ( sys-libs/ncurses ) |
84 |
pam? ( sys-auth/pambase ) |
85 |
>=sys-apps/baselayout-2.1-r1 |
86 |
kernel_linux? ( |
87 |
sys-process/psmisc |
88 |
) |
89 |
!<sys-fs/udev-init-scripts-17 |
90 |
!<sys-fs/udev-133" |
91 |
DEPEND="${RDEPEND} |
92 |
virtual/os-headers" |
93 |
|
94 |
src_prepare() { |
95 |
sed -i 's:0444:0644:' mk/sys.mk || die |
96 |
sed -i "/^DIR/s:/openrc:/${PF}:" doc/Makefile || die #241342 |
97 |
|
98 |
if [[ ${PV} == "9999" ]] ; then |
99 |
local ver="git-${EGIT_VERSION:0:6}" |
100 |
sed -i "/^GITVER[[:space:]]*=/s:=.*:=${ver}:" mk/git.mk || die |
101 |
fi |
102 |
|
103 |
# Allow user patches to be applied without modifying the ebuild |
104 |
epatch_user |
105 |
} |
106 |
|
107 |
src_compile() { |
108 |
unset LIBDIR #266688 |
109 |
|
110 |
MAKE_ARGS="${MAKE_ARGS} |
111 |
LIBNAME=$(get_libdir) |
112 |
LIBEXECDIR=${EPREFIX}/$(get_libdir)/rc" |
113 |
|
114 |
local brand="Unknown" |
115 |
if use kernel_linux ; then |
116 |
MAKE_ARGS="${MAKE_ARGS} OS=Linux" |
117 |
brand="Linux" |
118 |
elif use kernel_FreeBSD ; then |
119 |
MAKE_ARGS="${MAKE_ARGS} OS=FreeBSD" |
120 |
brand="FreeBSD" |
121 |
fi |
122 |
if use selinux; then |
123 |
MAKE_ARGS="${MAKE_ARGS} MKSELINUX=yes" |
124 |
fi |
125 |
export BRANDING="Gentoo ${brand}" |
126 |
if ! use static-libs; then |
127 |
MAKE_ARGS="${MAKE_ARGS} MKSTATICLIBS=no" |
128 |
fi |
129 |
use newnet || MAKE_ARGS="${MAKE_ARGS} MKNET=oldnet" |
130 |
use prefix && MAKE_ARGS="${MAKE_ARGS} MKPREFIX=yes PREFIX=${EPREFIX}" |
131 |
export DEBUG=$(usev debug) |
132 |
export MKPAM=$(usev pam) |
133 |
export MKTERMCAP=$(usev ncurses) |
134 |
|
135 |
tc-export CC AR RANLIB |
136 |
emake ${MAKE_ARGS} |
137 |
} |
138 |
|
139 |
# set_config <file> <option name> <yes value> <no value> test |
140 |
# a value of "#" will just comment out the option |
141 |
set_config() { |
142 |
local file="${ED}/$1" var=$2 val com |
143 |
eval "${@:5}" && val=$3 || val=$4 |
144 |
[[ ${val} == "#" ]] && com="#" && val='\2' |
145 |
sed -i -r -e "/^#?${var}=/{s:=([\"'])?([^ ]*)\1?:=\1${val}\1:;s:^#?:${com}:}" "${file}" |
146 |
} |
147 |
|
148 |
set_config_yes_no() { |
149 |
set_config "$1" "$2" YES NO "${@:3}" |
150 |
} |
151 |
|
152 |
src_install() { |
153 |
emake ${MAKE_ARGS} DESTDIR="${D}" install |
154 |
|
155 |
# move the shared libs back to /usr so ldscript can install |
156 |
# more of a minimal set of files |
157 |
# disabled for now due to #270646 |
158 |
#mv "${ED}"/$(get_libdir)/lib{einfo,rc}* "${ED}"/usr/$(get_libdir)/ || die |
159 |
#gen_usr_ldscript -a einfo rc |
160 |
gen_usr_ldscript libeinfo.so |
161 |
gen_usr_ldscript librc.so |
162 |
|
163 |
if ! use kernel_linux; then |
164 |
keepdir /$(get_libdir)/rc/init.d |
165 |
fi |
166 |
keepdir /$(get_libdir)/rc/tmp |
167 |
|
168 |
# Backup our default runlevels |
169 |
dodir /usr/share/"${PN}" |
170 |
cp -PR "${ED}"/etc/runlevels "${ED}"/usr/share/${PN} || die |
171 |
rm -rf "${ED}"/etc/runlevels |
172 |
|
173 |
# Install the default net configuration |
174 |
doconfd conf.d/net |
175 |
|
176 |
# Setup unicode defaults for silly unicode users |
177 |
set_config_yes_no /etc/rc.conf unicode use unicode |
178 |
|
179 |
# Cater to the norm |
180 |
set_config_yes_no /etc/conf.d/keymaps windowkeys '(' use x86 '||' use amd64 ')' |
181 |
|
182 |
# On HPPA, do not run consolefont by default (bug #222889) |
183 |
if use hppa; then |
184 |
rm -f "${ED}"/usr/share/openrc/runlevels/boot/consolefont |
185 |
fi |
186 |
|
187 |
# Support for logfile rotation |
188 |
insinto /etc/logrotate.d |
189 |
newins "${FILESDIR}"/openrc.logrotate openrc |
190 |
|
191 |
# install the gentoo pam.d file |
192 |
newpamd "${FILESDIR}"/start-stop-daemon.pam start-stop-daemon |
193 |
} |
194 |
|
195 |
add_boot_init() { |
196 |
local initd=$1 |
197 |
local runlevel=${2:-boot} |
198 |
# if the initscript is not going to be installed and is not |
199 |
# currently installed, return |
200 |
[[ -e "${ED}"/etc/init.d/${initd} || -e "${EROOT}"etc/init.d/${initd} ]] \ |
201 |
|| return |
202 |
[[ -e "${EROOT}"etc/runlevels/${runlevel}/${initd} ]] && return |
203 |
|
204 |
# if runlevels dont exist just yet, then create it but still flag |
205 |
# to pkg_postinst that it needs real setup #277323 |
206 |
if [[ ! -d "${EROOT}"etc/runlevels/${runlevel} ]] ; then |
207 |
mkdir -p "${EROOT}"etc/runlevels/${runlevel} |
208 |
touch "${EROOT}"etc/runlevels/.add_boot_init.created |
209 |
fi |
210 |
|
211 |
elog "Auto-adding '${initd}' service to your ${runlevel} runlevel" |
212 |
ln -snf "${EROOT}"etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd} |
213 |
} |
214 |
add_boot_init_mit_config() { |
215 |
local config=$1 initd=$2 |
216 |
if [[ -e ${EROOT}${config} ]] ; then |
217 |
if [[ -n $(sed -e 's:#.*::' -e '/^[[:space:]]*$/d' "${EROOT}"${config}) ]] ; then |
218 |
add_boot_init ${initd} |
219 |
fi |
220 |
fi |
221 |
} |
222 |
|
223 |
pkg_preinst() { |
224 |
local f LIBDIR=$(get_libdir) |
225 |
|
226 |
# default net script is just comments, so no point in biting people |
227 |
# in the ass by accident. we save in preinst so that the package |
228 |
# manager doesnt go throwing etc-update crap at us -- postinst is |
229 |
# too late to prevent that. this behavior also lets us keep the |
230 |
# file in the CONTENTS for binary packages. |
231 |
[[ -e "${EROOT}"etc/conf.d/net ]] && \ |
232 |
cp "${EROOT}"etc/conf.d/net "${ED}"/etc/conf.d/ |
233 |
|
234 |
# avoid default thrashing in conf.d files when possible #295406 |
235 |
if [[ -e "${EROOT}"etc/conf.d/hostname ]] ; then |
236 |
( |
237 |
unset hostname HOSTNAME |
238 |
source "${EROOT}"etc/conf.d/hostname |
239 |
: ${hostname:=${HOSTNAME}} |
240 |
[[ -n ${hostname} ]] && set_config /etc/conf.d/hostname hostname "${hostname}" |
241 |
) |
242 |
fi |
243 |
|
244 |
# upgrade timezone file ... do it before moving clock |
245 |
if [[ -e ${EROOT}etc/conf.d/clock && ! -e ${EROOT}/etc/timezone ]] ; then |
246 |
( |
247 |
unset TIMEZONE |
248 |
source "${EROOT}"etc/conf.d/clock |
249 |
[[ -n ${TIMEZONE} ]] && echo "${TIMEZONE}" > "${EROOT}"etc/timezone |
250 |
) |
251 |
fi |
252 |
|
253 |
# /etc/conf.d/clock moved to /etc/conf.d/hwclock |
254 |
local clock |
255 |
use kernel_FreeBSD && clock="adjkerntz" || clock="hwclock" |
256 |
if [[ -e "${EROOT}"etc/conf.d/clock ]] ; then |
257 |
mv "${EROOT}"etc/conf.d/clock "${EROOT}"etc/conf.d/${clock} |
258 |
fi |
259 |
if [[ -e "${EROOT}"etc/init.d/clock ]] ; then |
260 |
rm -f "${EROOT}"etc/init.d/clock |
261 |
fi |
262 |
if [[ -L "${EROOT}"etc/runlevels/boot/clock ]] ; then |
263 |
rm -f "${EROOT}"etc/runlevels/boot/clock |
264 |
ln -snf /etc/init.d/${clock} "${EROOT}"etc/runlevels/boot/${clock} |
265 |
fi |
266 |
if [[ -L "${EROOT}"${LIBDIR}/rc/init.d/started/clock ]] ; then |
267 |
rm -f "${EROOT}"${LIBDIR}/rc/init.d/started/clock |
268 |
ln -snf /etc/init.d/${clok} "${EROOT}"${LIBDIR}/rc/init.d/started/${clock} |
269 |
fi |
270 |
|
271 |
# /etc/conf.d/rc is no longer used for configuration |
272 |
if [[ -e "${EROOT}"etc/conf.d/rc ]] ; then |
273 |
elog "/etc/conf.d/rc is no longer used for configuration." |
274 |
elog "Please migrate your settings to /etc/rc.conf as applicable" |
275 |
elog "and delete /etc/conf.d/rc" |
276 |
fi |
277 |
|
278 |
# force net init.d scripts into symlinks |
279 |
for f in "${EROOT}"etc/init.d/net.* ; do |
280 |
[[ -e ${f} ]] || continue # catch net.* not matching anything |
281 |
[[ ${f} == */net.lo ]] && continue # real file now |
282 |
[[ ${f} == *.openrc.bak ]] && continue |
283 |
if [[ ! -L ${f} ]] ; then |
284 |
elog "Moved net service '${f##*/}' to '${f##*/}.openrc.bak' to force a symlink." |
285 |
elog "You should delete '${f##*/}.openrc.bak' if you don't need it." |
286 |
mv "${f}" "${f}.openrc.bak" |
287 |
ln -snf net.lo "${f}" |
288 |
fi |
289 |
done |
290 |
|
291 |
# termencoding was added in 0.2.1 and needed in boot |
292 |
has_version ">=sys-apps/openrc-0.2.1" || add_boot_init termencoding |
293 |
|
294 |
# swapfiles was added in 0.9.9 and needed in boot (february 2012) |
295 |
has_version ">=sys-apps/openrc-0.9.9" || add_boot_init swapfiles |
296 |
|
297 |
if ! has_version ">=sys-apps/openrc-0.11"; then |
298 |
add_boot_init sysfs sysinit |
299 |
fi |
300 |
|
301 |
# set default interactive shell to sulogin if it exists |
302 |
set_config /etc/rc.conf rc_shell /sbin/sulogin "#" test -e /sbin/sulogin |
303 |
|
304 |
has_version sys-apps/openrc || migrate_from_baselayout_1 |
305 |
has_version ">=sys-apps/openrc-0.4.0" || migrate_udev_init_script |
306 |
if ! has_version ">=sys-apps/openrc-0.11.3" ; then |
307 |
migrate_udev_mount_script |
308 |
add_boot_init tmpfiles.setup boot |
309 |
fi |
310 |
} |
311 |
|
312 |
# >=openrc-0.4.0 no longer loads the udev addon |
313 |
migrate_udev_init_script() { |
314 |
# make sure udev is in sysinit if it was enabled before |
315 |
local enable_udev=false |
316 |
local rc_devices=$( |
317 |
[[ -f /etc/rc.conf ]] && source /etc/rc.conf |
318 |
[[ -f /etc/conf.d/rc ]] && source /etc/conf.d/rc |
319 |
echo "${rc_devices:-${RC_DEVICES:-auto}}" |
320 |
) |
321 |
case ${rc_devices} in |
322 |
udev|auto) |
323 |
enable_udev=true |
324 |
;; |
325 |
esac |
326 |
|
327 |
if $enable_udev; then |
328 |
add_boot_init udev sysinit |
329 |
add_boot_init udev-postmount default |
330 |
fi |
331 |
} |
332 |
|
333 |
# >=OpenRC-0.11.3 requires udev-mount to be in the sysinit runlevel with udev. |
334 |
migrate_udev_mount_script() { |
335 |
if [ -e "${EROOT}"etc/runlevels/sysinit/udev -a \ |
336 |
! -e "${EROOT}"etc/runlevels/sysinit/udev-mount ]; then |
337 |
add_boot_init udev-mount sysinit |
338 |
fi |
339 |
return 0 |
340 |
} |
341 |
|
342 |
migrate_from_baselayout_1() { |
343 |
# baselayout boot init scripts have been split out |
344 |
for f in $(cd "${ED}"/usr/share/${PN}/runlevels/boot || exit; echo *) ; do |
345 |
# baselayout-1 is always "old" net, so ignore "new" net |
346 |
[[ ${f} == "network" ]] && continue |
347 |
|
348 |
add_boot_init ${f} |
349 |
done |
350 |
|
351 |
# Try to auto-add some addons when possible |
352 |
add_boot_init_mit_config /etc/conf.d/cryptfs dmcrypt |
353 |
add_boot_init_mit_config /etc/conf.d/dmcrypt dmcrypt |
354 |
add_boot_init_mit_config /etc/mdadm.conf mdraid |
355 |
add_boot_init_mit_config /etc/evms.conf evms |
356 |
[[ -e "${EROOT}"sbin/dmsetup ]] && add_boot_init device-mapper |
357 |
[[ -e "${EROOT}"sbin/vgscan ]] && add_boot_init lvm |
358 |
elog "Add on services (such as RAID/dmcrypt/LVM/etc...) are now stand alone" |
359 |
elog "init.d scripts. If you use such a thing, make sure you have the" |
360 |
elog "required init.d scripts added to your boot runlevel." |
361 |
|
362 |
# Upgrade our state for baselayout-1 users |
363 |
if [[ ! -e "${EROOT}"${LIBDIR}/rc/init.d/started ]] ; then |
364 |
( |
365 |
[[ -e "${EROOT}"etc/conf.d/rc ]] && source "${EROOT}"/etc/conf.d/rc |
366 |
svcdir=${svcdir:-/var/lib/init.d} |
367 |
if [[ ! -d "${EROOT}"${svcdir}/started ]] ; then |
368 |
ewarn "No state found, and no state exists" |
369 |
elog "You should reboot this host" |
370 |
else |
371 |
mkdir -p "${EROOT}"${LIBDIR}/rc/init.d |
372 |
einfo "Moving state from ${EROOT}${svcdir} to ${EROOT}${LIBDIR}/rc/init.d" |
373 |
mv "${EROOT}${svcdir}"/* "${EROOT}${LIBDIR}"/rc/init.d |
374 |
rm -rf "${EROOT}${LIBDIR}"/rc/init.d/daemons \ |
375 |
"${EROOT}${LIBDIR}"/rc/init.d/console |
376 |
umount "${EROOT}${svcdir}" 2>/dev/null |
377 |
rm -rf "${EROOT}${svcdir}" |
378 |
fi |
379 |
) |
380 |
fi |
381 |
|
382 |
# Handle the /etc/modules.autoload.d -> /etc/conf.d/modules transition |
383 |
if [[ -d "${EROOT}"etc/modules.autoload.d ]] ; then |
384 |
elog "Converting your /etc/modules.autoload.d/ files to /etc/conf.d/modules" |
385 |
rm -f "${EROOT}"etc/modules.autoload.d/.keep* |
386 |
rmdir "${EROOT}"etc/modules.autoload.d 2>/dev/null |
387 |
if [[ -d "${EROOT}"etc/modules.autoload.d ]] ; then |
388 |
local f v |
389 |
for f in "${EROOT}"etc/modules.autoload.d/* ; do |
390 |
v=${f##*/} |
391 |
v=${v#kernel-} |
392 |
v=${v//[^[:alnum:]]/_} |
393 |
gawk -v v="${v}" -v f="${f##*/}" ' |
394 |
BEGIN { print "\n### START: Auto-converted from " f "\n" } |
395 |
{ |
396 |
if ($0 ~ /^[^#]/) { |
397 |
print "modules_" v "=\"${modules_" v "} " $1 "\"" |
398 |
gsub(/[^[:alnum:]]/, "_", $1) |
399 |
printf "module_" $1 "_args_" v "=\"" |
400 |
for (i = 2; i <= NF; ++i) { |
401 |
if (i > 2) |
402 |
printf " " |
403 |
printf $i |
404 |
} |
405 |
print "\"\n" |
406 |
} else |
407 |
print |
408 |
} |
409 |
END { print "\n### END: Auto-converted from " f "\n" } |
410 |
' "${f}" >> "${ED}"/etc/conf.d/modules |
411 |
done |
412 |
rm -f "${f}" |
413 |
rmdir "${EROOT}"etc/modules.autoload.d 2>/dev/null |
414 |
fi |
415 |
fi |
416 |
} |
417 |
|
418 |
pkg_postinst() { |
419 |
local LIBDIR=$(get_libdir) |
420 |
|
421 |
# Remove old baselayout links |
422 |
rm -f "${EROOT}"etc/runlevels/boot/{check{fs,root},rmnologin} |
423 |
rm -f "${EROOT}"etc/init.d/{depscan,runscript}.sh |
424 |
|
425 |
# Make our runlevels if they don't exist |
426 |
if [[ ! -e "${EROOT}"etc/runlevels ]] || [[ -e "${EROOT}"etc/runlevels/.add_boot_init.created ]] ; then |
427 |
einfo "Copying across default runlevels" |
428 |
cp -RPp "${EROOT}"usr/share/${PN}/runlevels "${EROOT}"etc |
429 |
rm -f "${EROOT}"etc/runlevels/.add_boot_init.created |
430 |
else |
431 |
if [[ ! -e "${EROOT}"etc/runlevels/sysinit/devfs ]] ; then |
432 |
mkdir -p "${EROOT}"etc/runlevels/sysinit |
433 |
cp -RPp "${EROOT}"usr/share/${PN}/runlevels/sysinit/* \ |
434 |
"${EROOT}"etc/runlevels/sysinit |
435 |
fi |
436 |
if [[ ! -e "${EROOT}"etc/runlevels/shutdown/mount-ro ]] ; then |
437 |
mkdir -p "${EROOT}"etc/runlevels/shutdown |
438 |
cp -RPp "${EROOT}"usr/share/${PN}/runlevels/shutdown/* \ |
439 |
"${EROOT}"etc/runlevels/shutdown |
440 |
fi |
441 |
fi |
442 |
|
443 |
# /etc/conf.d/net.example is no longer valid |
444 |
local NET_EXAMPLE="${EROOT}etc/conf.d/net.example" |
445 |
local NET_MD5='8ebebfa07441d39eb54feae0ee4c8210' |
446 |
if [[ -e "${NET_EXAMPLE}" ]] ; then |
447 |
if [[ $(md5sum "${NET_EXAMPLE}") == ${NET_MD5}* ]]; then |
448 |
rm -f "${NET_EXAMPLE}" |
449 |
elog "${NET_EXAMPLE} has been removed." |
450 |
else |
451 |
sed -i '1i# This file is obsolete.\n' "${NET_EXAMPLE}" |
452 |
elog "${NET_EXAMPLE} should be removed." |
453 |
fi |
454 |
elog "The new file is ${EROOT}usr/share/doc/${PF}/net.example" |
455 |
fi |
456 |
|
457 |
# /etc/conf.d/wireless.example is no longer valid |
458 |
local WIRELESS_EXAMPLE="${EROOT}etc/conf.d/wireless.example" |
459 |
local WIRELESS_MD5='d1fad7da940bf263c76af4d2082124a3' |
460 |
if [[ -e "${WIRELESS_EXAMPLE}" ]] ; then |
461 |
if [[ $(md5sum "${WIRELESS_EXAMPLE}") == ${WIRELESS_MD5}* ]]; then |
462 |
rm -f "${WIRELESS_EXAMPLE}" |
463 |
elog "${WIRELESS_EXAMPLE} is deprecated and has been removed." |
464 |
else |
465 |
sed -i '1i# This file is obsolete.\n' "${WIRELESS_EXAMPLE}" |
466 |
elog "${WIRELESS_EXAMPLE} is deprecated and should be removed." |
467 |
fi |
468 |
elog "If you are using the old style network scripts," |
469 |
elog "Configure wireless settings in ${EROOT}etc/conf.d/net" |
470 |
elog "after reviewing ${EROOT}usr/share/doc/${PF}/net.example" |
471 |
fi |
472 |
|
473 |
if [[ -d "${EROOT}"etc/modules.autoload.d ]] ; then |
474 |
ewarn "/etc/modules.autoload.d is no longer used. Please convert" |
475 |
ewarn "your files to /etc/conf.d/modules and delete the directory." |
476 |
fi |
477 |
|
478 |
if use hppa; then |
479 |
elog "Setting the console font does not work on all HPPA consoles." |
480 |
elog "You can still enable it by running:" |
481 |
elog "# rc-update add consolefont boot" |
482 |
fi |
483 |
|
484 |
# Handle the conf.d/local.{start,stop} -> local.d transition |
485 |
if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then |
486 |
elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}" |
487 |
elog "files to ${EROOT}etc/local.d" |
488 |
mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start |
489 |
mv "${EROOT}"etc/conf.d/local.stop "${EROOT}"etc/local.d/baselayout1.stop |
490 |
chmod +x "${EROOT}"etc/local.d/*{start,stop} |
491 |
fi |
492 |
|
493 |
if use kernel_linux && [[ "${EROOT}" = "/" ]]; then |
494 |
if ! /$(get_libdir)/rc/sh/migrate-to-run.sh; then |
495 |
ewarn "The dependency data could not be migrated to /run/openrc." |
496 |
ewarn "This means you need to reboot your system." |
497 |
fi |
498 |
fi |
499 |
|
500 |
# update the dependency tree after touching all files #224171 |
501 |
[[ "${EROOT}" = "/" ]] && "${EROOT}/${LIBDIR}"/rc/bin/rc-depend -u |
502 |
|
503 |
if use newnet; then |
504 |
local netscript=network |
505 |
else |
506 |
local netscript=net.lo |
507 |
fi |
508 |
|
509 |
if [ ! -e "${EROOT}"etc/runlevels/boot/${netscript} ]; then |
510 |
ewarn "Please add the $netscript script to your boot runlevel" |
511 |
ewarn "as soon as possible. Not doing so could leave you with a system" |
512 |
ewarn "without networking." |
513 |
fi |
514 |
|
515 |
ewarn "In this version of OpenRC, the loopback interface no longer" |
516 |
ewarn "satisfies the net virtual." |
517 |
ewarn "If you have services now which do not start because of this," |
518 |
ewarn "They can be fixed by adding rc_need=\"!net\"" |
519 |
ewarn "to the ${EROOT}etc/conf.d/<servicename> file." |
520 |
ewarn "You should also file a bug against the service asking that" |
521 |
ewarn "need net be dropped from the dependencies." |
522 |
ewarn "The bug you file should block the following tracker:" |
523 |
ewarn "https://bugs.gentoo.org/show_bug.cgi?id=439092" |
524 |
|
525 |
ewarn "This version of OpenRC doesn't enable nfs mounts automatically any" |
526 |
ewarn "longer. In order to mount nfs file systems, you must use the" |
527 |
ewarn "nfsmount service from the nfs-utils package." |
528 |
ewarn "See bug https://bugs.gentoo.org/show_bug.cgi?id=427996 for" |
529 |
ewarn "more information on this." |
530 |
|
531 |
elog "You should now update all files in /etc, using etc-update" |
532 |
elog "or equivalent before restarting any services or this host." |
533 |
elog |
534 |
elog "Please read the migration guide available at:" |
535 |
elog "http://www.gentoo.org/doc/en/openrc-migration.xml" |
536 |
} |