diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-02-03 07:41:11 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-02-03 07:41:11 +0000 |
commit | 09ce0508afe6568cf580f53fb9952963125fff43 (patch) | |
tree | be336c26f16f7fd1e5c5454738c9332da34fb2d1 /testing/udev/udev-start.sh | |
parent | 9ad548df8aa2a860ca311453ed3d6a98962f32f5 (diff) | |
download | aports-09ce0508afe6568cf580f53fb9952963125fff43.tar.bz2 aports-09ce0508afe6568cf580f53fb9952963125fff43.tar.xz |
Revert "testing/*: remove from stable branch"
This reverts commit 9ad548df8aa2a860ca311453ed3d6a98962f32f5.
I'll delete them one by one.
Diffstat (limited to 'testing/udev/udev-start.sh')
-rw-r--r-- | testing/udev/udev-start.sh | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/udev/udev-start.sh b/testing/udev/udev-start.sh new file mode 100644 index 00000000..87c3a6ac --- /dev/null +++ b/testing/udev/udev-start.sh @@ -0,0 +1,51 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +[ -e /etc/conf.d/udev ] && . /etc/conf.d/udev + +compat_volume_nodes() +{ + # Only do this for baselayout-1* + # This check is likely to get false positives due to some multilib stuff, + # but that should not matter, as this can only happen on old openrc versions + # no longer available as ebuilds. + if [ ! -e /lib/librc.so ]; then + + # Create nodes that udev can't + [ -x /sbin/lvm ] && \ + /sbin/lvm vgscan -P --mknodes --ignorelockingfailure &>/dev/null + # Running evms_activate on a LiveCD causes lots of headaches + [ -z "${CDBOOT}" -a -x /sbin/evms_activate ] && \ + /sbin/evms_activate -q &>/dev/null + fi +} + +start_initd() +{ + ( + . /etc/init.d/"$1" + _start + ) +} + +# mount tmpfs on /dev +start_initd udev-mount || exit 1 + +# Create a file so that our rc system knows it's still in sysinit. +# Existance means init scripts will not directly run. +# rc will remove the file when done with sysinit. +# this is no longer needed as of openrc-0.4.0 +touch /dev/.rcsysinit + +# load device tarball +start_initd udev-dev-tarball + +# run udevd +start_initd udev || exit 1 + +compat_volume_nodes + +# inject into boot runlevel +IN_HOTPLUG=1 /etc/init.d/udev-postmount start >/dev/null 2>&1 + +# udev started successfully |