/[gentoo-x86]/sys-fs/udev/udev-164-r2.ebuild
Gentoo

Diff of /sys-fs/udev/udev-164-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.4 Revision 1.5
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/Attic/udev-164-r2.ebuild,v 1.4 2011/06/01 11:43:21 klausman Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/Attic/udev-164-r2.ebuild,v 1.5 2011/06/02 20:26:43 williamh Exp $
4 4
5EAPI="1" 5EAPI="1"
6 6
7inherit eutils flag-o-matic multilib toolchain-funcs linux-info 7inherit eutils flag-o-matic multilib toolchain-funcs linux-info
8 8
372 ebeep 372 ebeep
373 fi 373 fi
374} 374}
375 375
376postinst_init_scripts() { 376postinst_init_scripts() {
377 # FIXME: we may need some code that detects if this is a system bootstrap 377 local enable_postmount=false
378 # and auto-enables udev then 378
379 #
380 # FIXME: inconsistent handling of init-scripts here 379 # FIXME: inconsistent handling of init-scripts here
381 # * udev is added to sysinit in openrc-ebuild 380 # * udev is added to sysinit in openrc-ebuild
382 # * we add udev-postmount to default in here 381 # * we add udev-postmount to default in here
383 # 382 #
383
384 # If we are building stages, add udev to the sysinit runlevel automatically.
385 if use build
386 then
387 if [[ -x "${ROOT}"/etc/init.d/udev \
388 && -d "${ROOT}"/etc/runlevels/sysinit ]]
389 then
390 ln -s "${ROOT}"/etc/init.d/udev "${ROOT}"/etc/runlevels/sysinit/udev
391 fi
392 enable_postmount=true
393 fi
384 394
385 # migration to >=openrc-0.4 395 # migration to >=openrc-0.4
386 if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]] 396 if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
387 then 397 then
388 ewarn 398 ewarn
398 # like a hotplug event, 2009/10/15 408 # like a hotplug event, 2009/10/15
399 409
400 # already enabled? 410 # already enabled?
401 [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return 411 [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return
402 412
403 local enable_postmount=0
404 [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1 413 [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=true
405 [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1 414 [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=true
406 415
407 if [[ ${enable_postmount} = 1 ]] 416 if $enable_postmount
408 then 417 then
409 local initd=udev-postmount 418 local initd=udev-postmount
410 419
411 if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \ 420 if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
412 [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]] 421 [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.20