diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/udev/APKBUILD | 10 | ||||
-rwxr-xr-x | main/udev/move_tmp_persistent_rules.sh | 25 | ||||
-rw-r--r-- | main/udev/udev-postmount.initd | 32 | ||||
-rw-r--r-- | main/udev/udev.initd | 10 |
4 files changed, 32 insertions, 45 deletions
diff --git a/main/udev/APKBUILD b/main/udev/APKBUILD index be7e52d930..591cede4a8 100644 --- a/main/udev/APKBUILD +++ b/main/udev/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=udev pkgver=173 -pkgrel=0 +pkgrel=1 pkgdesc="The userspace dev tools (udev)" url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" arch="all" @@ -13,7 +13,6 @@ makedepends="gobject-introspection-dev glib-dev gperf acl-dev libusb-compat-dev install= source="http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgname-$pkgver.tar.bz2 write_root_link_rule - move_tmp_persistent_rules.sh udev-mount.initd udev-postmount.initd udev.initd" @@ -37,7 +36,7 @@ package() { mkdir -p "$pkgdir"/usr/lib/pkgconfig chmod +x "$pkgdir"/lib/udev/write_*_rules - for _i in write_root_link_rule move_tmp_persistent_rules.sh; do + for _i in write_root_link_rule; do install -Dm755 ../$_i "$pkgdir"/lib/udev/$_i done for _i in udev udev-mount udev-postmount; do @@ -69,7 +68,6 @@ libgudev() { md5sums="91a88a359b60bbd074b024883cc0dbde udev-173.tar.bz2 c9de7581099cdfdcd105666cd98a0f0a write_root_link_rule -7bf11e11519117f743483c73e0767750 move_tmp_persistent_rules.sh 884d7faaaa149a323b14e907ea1934f4 udev-mount.initd -8f0a1b371804c7fa30f1a7bfde88e9ea udev-postmount.initd -42b7e4ad49874e68851fc21153f41c4f udev.initd" +e99c87e62e7cb5acc4c55bf065944a11 udev-postmount.initd +a2deccd61391c71693c0217a0e6dd861 udev.initd" diff --git a/main/udev/move_tmp_persistent_rules.sh b/main/udev/move_tmp_persistent_rules.sh deleted file mode 100755 index 1a0259798b..0000000000 --- a/main/udev/move_tmp_persistent_rules.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -. /etc/init.d/functions.sh - -# store persistent-rules that got created while booting -# when / was still read-only -store_persistent_rules() { - local file dest - - for file in /dev/.udev/tmp-rules--*; do - dest=${file##*tmp-rules--} - [ "$dest" = '*' ] && break - type=${dest##70-persistent-} - type=${type%%.rules} - ebegin "Saving udev persistent ${type} rules to /etc/udev/rules.d" - cat "$file" >> /etc/udev/rules.d/"$dest" && rm -f "$file" - eend $? "Failed moving persistent rules!" - done -} - -store_persistent_rules - -# vim:ts=4 diff --git a/main/udev/udev-postmount.initd b/main/udev/udev-postmount.initd index 33a412ff87..9f71c18f30 100644 --- a/main/udev/udev-postmount.initd +++ b/main/udev/udev-postmount.initd @@ -1,33 +1,45 @@ #!/sbin/runscript # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/161/udev-postmount.initd,v 1.1 2010/08/24 18:41:29 zzam Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/164/udev-postmount.initd,v 1.1 2010/10/30 13:53:54 zzam Exp $ depend() { need localmount - after dbus # for trigger failed } dir_writeable() { - printf "" 2>/dev/null >"$1"/.test.$$ && rm "$1"/.test.$$ + touch "$1"/.test.$$ 2>/dev/null && rm "$1"/.test.$$ } +# store persistent-rules that got created while booting +# when / was still read-only +store_persistent_rules() { + # only continue if rules-directory is writable + dir_writeable /etc/udev/rules.d || return 0 + + local file dest + for file in /dev/.udev/tmp-rules--*; do + dest=${file##*tmp-rules--} + [ "$dest" = '*' ] && break + type=${dest##70-persistent-} + type=${type%%.rules} + ebegin "Saving udev persistent ${type} rules to /etc/udev/rules.d" + cat "$file" >> /etc/udev/rules.d/"$dest" && rm -f "$file" + eend $? "Failed moving persistent rules!" + done +} + + start() { # check if this system uses udev [ -d /dev/.udev/ ] || return 0 einfo "Doing udev cleanups" - # Run the events that failed at first udev trigger - udevadm trigger --type=failed -v - - # only continue if rules-directory is writable - dir_writeable /etc/udev/rules.d || return 0 - # store persistent-rules that got created while booting # when / was still read-only - /lib/udev/move_tmp_persistent_rules.sh + store_persistent_rules } stop() { diff --git a/main/udev/udev.initd b/main/udev/udev.initd index e48ea9b675..1a9869d80e 100644 --- a/main/udev/udev.initd +++ b/main/udev/udev.initd @@ -19,7 +19,7 @@ depend() before checkfs fsck # udev does not work inside vservers - keyword novserver nolxc noopenvz + keyword novserver nolxc } cleanup() @@ -58,9 +58,11 @@ rules_disable_switch() start_udevd() { - # load unix domain sockets if built as module, Bug #221253 - if [ -e /proc/modules ] ; then - modprobe -q unix 2>/dev/null + # load unix domain sockets if built as module, Bug #221253 and not yet loaded, Bug #363549 + if [ ! -e /proc/net/unix ]; then + if ! modprobe unix; then + eerror "Cannot load the unix domain socket module" + fi fi local opts="${udev_opts}" |