Skip to content
Browse files

'Smarter' handling of the mdev.

  • Loading branch information...
1 parent 7abd12c commit 5bb800a034e47df5bf5bb613bf99223036980359 Piotr Karbowski committed Dec 17, 2012
Showing with 24 additions and 21 deletions.
  1. +5 −19 sys-fs/mdev-bb/mdev-bb-1.20.2.ebuild
  2. +19 −2 sys-fs/mdev-like-a-boss/mdev-like-a-boss-9999.ebuild
View
24 sys-fs/mdev-bb/mdev-bb-1.20.2.ebuild
@@ -19,7 +19,6 @@ RESTRICT="test"
RDEPEND="
!sys-apps/busybox[mdev]
- mdev-like-a-boss? ( sys-fs/mdev-like-a-boss )
"
DEPEND="${RDEPEND}
>=sys-kernel/linux-headers-2.6.39"
@@ -66,24 +65,11 @@ src_install() {
mkdir "${D}/sbin" || die
cp busybox "${D}/sbin/mdev" || die
chmod 750 "${D}/sbin/mdev" || die
-
- if use mdev-like-a-boss; then
- mkdir -p "${D}/etc" || die
- ( cd "${D}/etc" && ln -s ../opt/mdev/mdev.conf ) || die
- newinitd "${ROOT}/opt/mdev/mdev.init" mdev || die
- fi
}
-src_postinst() {
- if use mdev-like-a-boss; then
- if ! [ -e "${ROOT}/etc/runlevels/sysinit" ]; then
- ewarn
- ewarn "Remember to add mdev to sysinit runlevel by:"
- ewarn " rc-update add mdev sysinit"
- ewarn
- ewarn "Also ensure that udev, udev-postmount and devfs"
- ewarn "aren't in any runlevel."
- ewarn
- fi
- fi
+pkg_postinst() {
+ ewarn
+ ewarn "This is only mdev binary, for init script and confing you may want"
+ ewarn "to install mdev-like-a-boss package."
+ ewarn
}
View
21 sys-fs/mdev-like-a-boss/mdev-like-a-boss-9999.ebuild
@@ -9,13 +9,30 @@ EGIT_REPO_URI="git://github.com/slashbeast/mdev-like-a-boss.git"
KEYWORDS="~amd64 ~x86"
LICENSE="BSD"
SLOT="0"
-IUSE=""
+IUSE="+mdev-bb"
DEPEND=""
-RDEPEND="${DEPEND}"
+RDEPEND="${DEPEND}
+ mdev-bb? ( sys-fs/mdev-bb )"
src_install() {
+ mkdir -p "${D}/etc" || die
+ mv "${S}/mdev.conf" "${D}/etc/mdev.conf"
+
+ newinitd "${S}/mdev.init" mdev || die
+ rm -f "${S}/mdev.init"
+
mkdir -p "${D}/opt/mdev" || die
cp -a "${S}"/* "${D}/opt/mdev/" || die
}
+pkg_postinst() {
+ einfo
+ einfo "Remember to add mdev to sysinit runlevel."
+ einfo " rc-update add mdev sysinit"
+ einfo
+ ewarn
+ ewarn "Also remember to remove any udev* and devfs init scripts"
+ ewarn "from all runlevels."
+ ewarn
+}

0 comments on commit 5bb800a

Please sign in to comment.
Something went wrong with that request. Please try again.