udev-init-scripts-32.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. if [ "${PV}" = "9999" ]; then
  5. EGIT_REPO_URI="git://anongit.gentoo.org/proj/udev-gentoo-scripts.git"
  6. inherit git-r3
  7. else
  8. SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.gz"
  9. KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86"
  10. fi
  11. DESCRIPTION="udev startup scripts for openrc"
  12. HOMEPAGE="https://www.gentoo.org"
  13. LICENSE="GPL-2"
  14. SLOT="0"
  15. IUSE=""
  16. RESTRICT="test"
  17. DEPEND=""
  18. RDEPEND=">=virtual/udev-217
  19. !<sys-apps/openrc-0.14"
  20. pkg_postinst() {
  21. # Add udev and udev-trigger to the sysinit runlevel automatically.
  22. for f in udev udev-trigger; do
  23. if [[ -x ${ROOT%/}/etc/init.d/${f} &&
  24. -d ${ROOT%/}/etc/runlevels/sysinit &&
  25. ! -L "${ROOT%/}/etc/runlevels/sysinit/${f}" ]]; then
  26. ln -snf /etc/init.d/${f} "${ROOT%/}"/etc/runlevels/sysinit/${f}
  27. ewarn "Adding ${f} to the sysinit runlevel"
  28. fi
  29. done
  30. if ! has_version "sys-fs/eudev[rule-generator]" && \
  31. [[ -x $(type -P rc-update) ]] && rc-update show | grep udev-postmount | grep -qs 'boot\|default\|sysinit'; then
  32. ewarn "The udev-postmount service has been removed because the reasons for"
  33. ewarn "its existance have been removed upstream."
  34. ewarn "Please remove it from your runlevels."
  35. fi
  36. }