summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rwxr-xr-xhelpers/move_tmp_persistent_rules.sh25
-rw-r--r--rc/openrc/udev-postmount28
3 files changed, 23 insertions, 33 deletions
diff --git a/Makefile b/Makefile
index c33e4ba..f331187 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ INITD ?= $(DESTDIR)/etc/init.d
CONFD ?= $(DESTDIR)/etc/conf.d
RCADDON ?= $(DESTDIR)/$(LIBDIR)/rcscripts/addons
-VERSION = 162
+VERSION = 164
KV_min ?= 2.6.24
KV_reliable ?= 2.6.26
@@ -15,7 +15,6 @@ KV_reliable ?= 2.6.26
DESTNAME = udev-gentoo-scripts-$(VERSION)
HELPERS = \
helpers/net.sh \
- helpers/move_tmp_persistent_rules.sh \
helpers/write_root_link_rule
HELPERS_NOEXE = \
diff --git a/helpers/move_tmp_persistent_rules.sh b/helpers/move_tmp_persistent_rules.sh
deleted file mode 100755
index 1a02597..0000000
--- a/helpers/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/rc/openrc/udev-postmount b/rc/openrc/udev-postmount
index 33a412f..12a30f6 100644
--- a/rc/openrc/udev-postmount
+++ b/rc/openrc/udev-postmount
@@ -1,7 +1,7 @@
#!/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
@@ -10,9 +10,28 @@ depend() {
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
@@ -22,12 +41,9 @@ start() {
# 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() {