udev: switch to OpenRC; bump revision.
--HG-- extra : convert_revision : 5fdfb64e584411c294ecadb2dc90286056313905
This commit is contained in:
parent
2ed7b24d16
commit
4e869cddf8
4 changed files with 69 additions and 0 deletions
20
templates/udev/INSTALL
Normal file
20
templates/udev/INSTALL
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#
|
||||||
|
# This script registers the udev service into the
|
||||||
|
# 'sysinit' runlevel, as required by OpenRC.
|
||||||
|
#
|
||||||
|
|
||||||
|
case "${ACTION}" in
|
||||||
|
pre)
|
||||||
|
;;
|
||||||
|
post)
|
||||||
|
[ ! -x sbin/rc-update ] && exit 0
|
||||||
|
[ ! -x sbin/rc-service ] && exit 0
|
||||||
|
|
||||||
|
if sbin/rc-service -e udev; then
|
||||||
|
echo "Registering udev OpenRC service..."
|
||||||
|
sbin/rc-update add udev sysinit
|
||||||
|
[ $? -ne 0 ] && exit $?
|
||||||
|
sbin/rc-update -u
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
20
templates/udev/REMOVE
Normal file
20
templates/udev/REMOVE
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#
|
||||||
|
# This script unregisters the udev service from the
|
||||||
|
# 'sysinit' runlevel, as required by OpenRC.
|
||||||
|
#
|
||||||
|
|
||||||
|
case "${ACTION}" in
|
||||||
|
pre)
|
||||||
|
[ ! -x sbin/rc-update ] && exit 0
|
||||||
|
[ ! -x sbin/rc-service ] && exit 0
|
||||||
|
|
||||||
|
if sbin/rc-service -e udev; then
|
||||||
|
echo "Unregistering udev OpenRC service..."
|
||||||
|
sbin/rc-update del udev sysinit
|
||||||
|
[ $? -ne 0 ] && exit $?
|
||||||
|
sbin/rc-update -u
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
post)
|
||||||
|
;;
|
||||||
|
esac
|
25
templates/udev/files/udev.rc
Normal file
25
templates/udev/files/udev.rc
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/sbin/runscript
|
||||||
|
#
|
||||||
|
# OpenRC service for udev(7).
|
||||||
|
|
||||||
|
command=/sbin/udevd
|
||||||
|
command_args="--daemon"
|
||||||
|
name="UDev Daemon"
|
||||||
|
|
||||||
|
depend()
|
||||||
|
{
|
||||||
|
provide dev
|
||||||
|
need sysfs
|
||||||
|
before checkfs fsck
|
||||||
|
keyword novserver
|
||||||
|
}
|
||||||
|
|
||||||
|
start()
|
||||||
|
{
|
||||||
|
echo > /proc/sys/kernel/hotplug
|
||||||
|
|
||||||
|
ebegin "Starting UDev and waiting for uevents"
|
||||||
|
${command} ${command_args} && \
|
||||||
|
udevadm trigger && udevadm settle
|
||||||
|
eend $?
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
# Template file for 'udev'
|
# Template file for 'udev'
|
||||||
pkgname=udev
|
pkgname=udev
|
||||||
version=141
|
version=141
|
||||||
|
revision=1
|
||||||
patch_files="arch-udev-rules.diff"
|
patch_files="arch-udev-rules.diff"
|
||||||
distfiles="${KERNEL_SITE}/utils/kernel/hotplug/udev-${version}.tar.bz2"
|
distfiles="${KERNEL_SITE}/utils/kernel/hotplug/udev-${version}.tar.bz2"
|
||||||
build_style=gnu_configure
|
build_style=gnu_configure
|
||||||
|
@ -37,4 +38,7 @@ post_install()
|
||||||
ln -s /proc/self/fd/1 $DESTDIR/lib/udev/devices/stdout
|
ln -s /proc/self/fd/1 $DESTDIR/lib/udev/devices/stdout
|
||||||
ln -s /proc/self/fd/2 $DESTDIR/lib/udev/devices/stderr
|
ln -s /proc/self/fd/2 $DESTDIR/lib/udev/devices/stderr
|
||||||
ln -s /proc/kcore $DESTDIR/lib/udev/devices/core
|
ln -s /proc/kcore $DESTDIR/lib/udev/devices/core
|
||||||
|
|
||||||
|
# Install the OpenRC service
|
||||||
|
install -D -m755 ${FILESDIR}/udev.rc ${DESTDIR}/etc/init.d/udev
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue