summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2009-10-20 12:38:15 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2009-10-20 12:38:15 +0000
commit8f3bb44752987cffd70c33ac60cc5891e9145c37 (patch)
tree71407226c7946311e1777713588f7515ad588dc9 /sys-fs
parentx86 stable, bug #284967 (diff)
downloadhistorical-8f3bb44752987cffd70c33ac60cc5891e9145c37.tar.gz
historical-8f3bb44752987cffd70c33ac60cc5891e9145c37.tar.bz2
historical-8f3bb44752987cffd70c33ac60cc5891e9145c37.zip
Update init-scripts. udev-postmount should be in default runlevel. No longer handle it like a synthetic hotplug event. Let it rerun failed events. Handle devtmpfs if supported, and also the case /dev is already mounted. Do not run net.* init-scripts if the new network init-script is used. Cleanup of pre/postinst code.
Package-Manager: portage-2.2_rc46/cvs/Linux i686
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/udev/ChangeLog11
-rw-r--r--sys-fs/udev/Manifest20
-rw-r--r--sys-fs/udev/files/147/shell-compat-addon.sh21
-rwxr-xr-xsys-fs/udev/files/147/udev-mount.initd12
-rwxr-xr-xsys-fs/udev/files/147/udev-postmount.initd5
-rw-r--r--sys-fs/udev/files/147/udev.initd6
-rw-r--r--sys-fs/udev/udev-9999.ebuild85
7 files changed, 96 insertions, 64 deletions
diff --git a/sys-fs/udev/ChangeLog b/sys-fs/udev/ChangeLog
index fe2a79e5711d..3c509bb0511a 100644
--- a/sys-fs/udev/ChangeLog
+++ b/sys-fs/udev/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sys-fs/udev
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.499 2009/10/15 21:40:47 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.500 2009/10/20 12:38:15 zzam Exp $
+
+ 20 Oct 2009; Matthias Schwarzott <zzam@gentoo.org>
+ files/147/shell-compat-addon.sh, udev-9999.ebuild, files/147/udev.initd,
+ files/147/udev-mount.initd, files/147/udev-postmount.initd:
+ Update init-scripts. udev-postmount should be in default runlevel. No
+ longer handle it like a synthetic hotplug event. Let it rerun failed
+ events. Handle devtmpfs if supported, and also the case /dev is already
+ mounted. Do not run net.* init-scripts if the new network init-script is
+ used. Cleanup of pre/postinst code.
15 Oct 2009; Matthias Schwarzott <zzam@gentoo.org>
+files/147/shell-compat-KV.sh, +files/147/shell-compat-addon.sh,
diff --git a/sys-fs/udev/Manifest b/sys-fs/udev/Manifest
index aeb828e5f58c..1180c43aad5f 100644
--- a/sys-fs/udev/Manifest
+++ b/sys-fs/udev/Manifest
@@ -11,14 +11,14 @@ AUX 136/udev-stop.sh 237 RMD160 dea1f6d7525e792484c3d2c31d36e8b4d78ebda8 SHA1 72
AUX 136/udev.confd 1764 RMD160 255afed98d59675108bc96e1639f9b7e8baed4b3 SHA1 19f465c7140818860ce5031e85118d48544c3629 SHA256 6918ce2ad61a7998088e1628e5bd1b59a9082cdb89dc23b1385f641d8a59cdb6
AUX 136/udev.initd 5788 RMD160 76990933287475809083ddc6b2e83383d5500d67 SHA1 adc8c33d287f1ccdcc1db16655a7b11397d1ff79 SHA256 5a051c02f7a64d102d9b73b8a73bf1d6fe3d692d7839dde117da21a948d90ce9
AUX 147/shell-compat-KV.sh 1012 RMD160 5bc85047b4237d502f7b0ccc7181f9974c2b0898 SHA1 bbc58d6181f3fc8d623de1537eddcc1ede919202 SHA256 2393918bc65c69e1c19d7712292c945a4adfe45ce02b88ae7663167b8745cf8b
-AUX 147/shell-compat-addon.sh 1285 RMD160 2600a3a3e7a78f4085109ad3865c5a37c02eeff5 SHA1 d7adb321948aea4dbcf156c367ead954d473173e SHA256 37395c65b97bb77ab18eb6818350b59e2e787214393b6250265326c15de53681
+AUX 147/shell-compat-addon.sh 1706 RMD160 feda3632aacbda824df059313a9b62fbfa2d087e SHA1 a0fa72aa1129b4abcdb8fc4060313c7bc432c20c SHA256 481eb655c58cbb65163a2ac58022b730d1e720d4066273358627a4fe98c52a1f
AUX 147/udev-dev-tarball.initd 2579 RMD160 b7feb34f854a3eb08d1203f1faabf9cecee3101c SHA1 10ecda997314851d86a175db8cbfcc6a343e9bb2 SHA256 a829fa3efb9d6aadb137cb8879b8bc2660ef6500b2dbb8d55db8edf52f332d60
-AUX 147/udev-mount.initd 2778 RMD160 69fe586d560834ba6eb18a84372abf975da57fb5 SHA1 8b63f22da75846316d6e5232e63827665c689abf SHA256 830d0e3a5679eeb8b3d1f40c3069418c4c0001989a9b297d79b42bf34bf71219
-AUX 147/udev-postmount.initd 907 RMD160 9fd233883a68f0d5f1c83d8e1fb4a68baaa07083 SHA1 2d2a2b3488e804ba621ad23c9ff05f62f7aaf27d SHA256 818486b6b2937978ae7e375358b4de16dc45223bc01663e1421e1bad5e7dc38a
+AUX 147/udev-mount.initd 2889 RMD160 1b547d5c97e2aa02a2a0ef003f274dc0b15d4d6c SHA1 5ccc13d7bc23f8a1a78d3e0fcd21c95844933bbd SHA256 d8d21b393b5bcc6069baa9eb52ec073d265c8cd75d7ffa87828fe98b9c693fbc
+AUX 147/udev-postmount.initd 803 RMD160 a68a0ff59442f365f2866f689852f3fdf24413b3 SHA1 76ce7396310d7e352f4e359ccf11991aaf1fda6d SHA256 c3d74922672363f6fe7e2caa2f349448b060ee491eaea2cdefae44800297caa8
AUX 147/udev-start.sh 1254 RMD160 9a9e610b17922d5bc32fe4acfc023b1e9d5474f9 SHA1 3518cd5076a346b0896c8195f032aa765127cc09 SHA256 1c01a6eda394c13524cbb5393bd25f9c771b77c19cb2fe4616ec8afeacbfcde9
AUX 147/udev-stop.sh 237 RMD160 dea1f6d7525e792484c3d2c31d36e8b4d78ebda8 SHA1 72174a2e5e6be2133b2e5f68e477d0fa342b46ce SHA256 1dbdaa45b9f1e54faba9d153a93c0043aabe5b51270c233d3a5e48a6c1d20a1d
AUX 147/udev.confd 1764 RMD160 255afed98d59675108bc96e1639f9b7e8baed4b3 SHA1 19f465c7140818860ce5031e85118d48544c3629 SHA256 6918ce2ad61a7998088e1628e5bd1b59a9082cdb89dc23b1385f641d8a59cdb6
-AUX 147/udev.initd 6305 RMD160 dd3fe0e76294ecfc740b60e22c45ff695f004519 SHA1 b260763c1b1423f5eef2d720976e93f4659a2305 SHA256 82d69eaef77123ec1078e1e072a5c710be82f6c9a075fd81cd4606e9731bc13d
+AUX 147/udev.initd 6347 RMD160 08b7dd91c4dee8cbb136007db15d86e7520900a2 SHA1 9f44df80d0ec592fbea428df2c05b78c02ecee52 SHA256 f398edd2a1c10e1182f3540dc554c06734cdf5d01b814f2995f28ab808b0c1b2
AUX blacklist-110 854 RMD160 6cb0acd91dad5c86c47b41f06f74a8529de08b8e SHA1 aa2c3c8340517053151ee687d76d4de05e28ac51 SHA256 438020f3499a2e10a19ba8d3fe7d567572322093ea878e8c18336b067442bcdd
AUX blacklist-146 950 RMD160 cc53bfcd2c56bca3cd65b745db80a821122b5c82 SHA1 bdfc5e83d17cef31b6f98546040e1ddf39af3795 SHA256 12d60698be657c9c5b40c8cb6c3649d02f8d8c8f05d63dab7c8bee0a30c339c4
AUX modprobe-114.sh 2106 RMD160 7b40f1d0c7e41aa51100c99d1b4accafe9309f00 SHA1 d8d3a6b047a416bf4a80a9dde6eddbcc1e7abb1b SHA256 acfff1be773352f71b7e68ec12aafa113150f76ecb1daa03088842d449df9d6b
@@ -75,13 +75,13 @@ EBUILD udev-145-r3.ebuild 15407 RMD160 be741872a7fe457e088ff2111eb315b65c7225f1
EBUILD udev-145.ebuild 13607 RMD160 b0895ed911a6d6c4d45d14364e8c11259f52a463 SHA1 011bcbe8eadfd05385c2a39b96c9776ff7bdc34a SHA256 d4f95324a07c0a53df1397719b7aef06b10538a67ddf46a68549b1eff4d551d3
EBUILD udev-146-r1.ebuild 15411 RMD160 92b896131c4b6316030f5b9d086ab583a691f1bf SHA1 5dd50a2206eb10b1056f6c09c9db996cd7f0f2e3 SHA256 da93a288c65490d3d22e98f61f17d71792cadd7a5794abab31808f28c5348ef5
EBUILD udev-146.ebuild 15340 RMD160 d2d6ac34af9271ecba096607e01e679547b7df3c SHA1 c1d1cd2e96a395065b93315af38412d5f1c5f6ea SHA256 ea450be06bf24a677a89c89b89d8a04c49acae66c77a4d71aed92c998d1f8103
-EBUILD udev-9999.ebuild 15622 RMD160 41e9b3002e833236a10e668be0288b58f875c491 SHA1 f0cedf223544505d8af1de127f9eca57864c45d8 SHA256 482b1c32725523b133030b156033402c9cd08f76281451c515caf2bda9607dba
-MISC ChangeLog 102397 RMD160 cde42726e54bd0addd7b5b3f24333006490d641d SHA1 4ed65bc1511247110f64b9be8d1c13d5fb1e0b88 SHA256 1693bfcee26cf3c0926df3a34801c17dee95cde8ed373e25b2fdf2f129b932b4
+EBUILD udev-9999.ebuild 15662 RMD160 63931e70ece56a259ef70064d64fa3b476627b88 SHA1 2ce8dd3bab796cb84deef8012ea5a4a3e91a0ea1 SHA256 15a38e566750ddc77825ad2c0c3cf08b4ae35cf52d4652b350ad77d003ec63fc
+MISC ChangeLog 102918 RMD160 679f24b0bfd859330eb9b657d82504e5726cd09c SHA1 e370d6a77aaf6fb9538b242b3d540036aa9181ce SHA256 3a60839e883c706849eee64789c35324de7fc15cff9851d03a31abfe0ee91783
MISC metadata.xml 402 RMD160 fad8844286866f47eadb2fd958f54f650976fe2a SHA1 c966d4e9e509d399523d1ba6ef54277e750334de SHA256 1c524286463bf115615462e9504c27710331f1d82a0828de5d78686f5e303ed5
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.11 (GNU/Linux)
+Version: GnuPG v2.0.13 (GNU/Linux)
-iEYEARECAAYFAkrXluQACgkQt2vP6XvVdOdlHgCgqvI4SQ9Xgj8d3zeBcn6ZT3Cu
-53YAoJYCv+nJ2tiBJlgwD9AREysLA4sy
-=qnbf
+iEYEARECAAYFAkrdr0QACgkQt2vP6XvVdOfW1ACgmvmsmBzsKHwlReQPtSvgL+ln
+A7kAn00UVc0WhKwlx3yGU/rhcETeg7HJ
+=wNAb
-----END PGP SIGNATURE-----
diff --git a/sys-fs/udev/files/147/shell-compat-addon.sh b/sys-fs/udev/files/147/shell-compat-addon.sh
index f9bf51bfa0e5..c271abfd548f 100644
--- a/sys-fs/udev/files/147/shell-compat-addon.sh
+++ b/sys-fs/udev/files/147/shell-compat-addon.sh
@@ -20,10 +20,27 @@ if ! cmd_exist yesno; then
}
fi
+# does not exist in baselayout-1, does exist in openrc
+#
+# mountinfo <path>
+# check if some filesystem is mounted at mountpoint <path>
+#
+# return value:
+# 0 filesystem is mounted at <path>
+# 1 no filesystem is mounted exactly at <path>
if ! cmd_exist mountinfo; then
mountinfo() {
- # returning false makes the behaviour same as without check
- return 1
+ [ "$1" = "-q" ] && shift
+ local dir="$1"
+
+ # check if entry is in /proc/mounts
+ local ret=$(gawk 'BEGIN { found="false"; }
+ $1 ~ "^#" { next }
+ $2 == "'$dir'" { found="true"; }
+ END { print found; }
+ ' /proc/mounts)
+
+ "${ret}"
}
fi
diff --git a/sys-fs/udev/files/147/udev-mount.initd b/sys-fs/udev/files/147/udev-mount.initd
index 74d85fa80823..179c9f80ac59 100755
--- a/sys-fs/udev/files/147/udev-mount.initd
+++ b/sys-fs/udev/files/147/udev-mount.initd
@@ -30,14 +30,20 @@ check_kernel()
mount_dev_directory()
{
- mountinfo -q /dev && return 0
+ if mountinfo -q /dev; then
+ einfo "/dev is already mounted"
+ return 0
+ fi
# No options are processed here as they should all be in /etc/fstab
ebegin "Mounting /dev"
if ! fstabinfo --mount /dev; then
+ # we mount devtmpfs if supported
+ local fs=tmpfs
+ grep -qs devtmpfs /proc/filesystems && fs=devtmpfs
+
# Some devices require exec, Bug #92921
- # we could mount devtmpfs if supported
- mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=10M" udev /dev
+ mount -n -t "$fs" -o "exec,nosuid,mode=0755,size=10M" udev /dev
fi
eend $?
}
diff --git a/sys-fs/udev/files/147/udev-postmount.initd b/sys-fs/udev/files/147/udev-postmount.initd
index f67833640764..439d1a596a6e 100755
--- a/sys-fs/udev/files/147/udev-postmount.initd
+++ b/sys-fs/udev/files/147/udev-postmount.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/147/udev-postmount.initd,v 1.1 2009/10/15 21:40:44 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/147/udev-postmount.initd,v 1.2 2009/10/20 12:38:14 zzam Exp $
depend() {
need localmount
@@ -17,9 +17,6 @@ start() {
# check if this system uses udev
[ -d /dev/.udev/ ] || return 0
- # disable coldplug stop from /etc/init.d/udev trigger
- udevadm control --env do_not_run_plug_service=
-
# Run the events that failed at first udev trigger
udevadm trigger --type=failed -v
diff --git a/sys-fs/udev/files/147/udev.initd b/sys-fs/udev/files/147/udev.initd
index eba25645e879..16b00894cd4d 100644
--- a/sys-fs/udev/files/147/udev.initd
+++ b/sys-fs/udev/files/147/udev.initd
@@ -115,8 +115,10 @@ populate_dev()
fi
eend $?
- # we can speed up booting by not waiting for udev to finish event-processing
- # if using devtmpfs so that kernel already created the device nodes for us
+ # we can speed up booting under these conditions:
+ # * using devtmpfs so kernel creates device nodes for us
+ # * only using kernel created device nodes at boot (in /etc/fstab and elsewhere)
+ #
ebegin "Waiting for uevents to be processed"
udevadm settle --timeout=${udev_settle_timeout:-60}
eend $?
diff --git a/sys-fs/udev/udev-9999.ebuild b/sys-fs/udev/udev-9999.ebuild
index 90f72b229f8a..c014c8ae2d46 100644
--- a/sys-fs/udev/udev-9999.ebuild
+++ b/sys-fs/udev/udev-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-9999.ebuild,v 1.16 2009/10/15 21:40:47 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-9999.ebuild,v 1.17 2009/10/20 12:38:15 zzam Exp $
EAPI="1"
@@ -298,6 +298,7 @@ src_install() {
}
pkg_preinst() {
+ # moving old files to support newer modprobe, 12 May 2009
local f dir=${ROOT}/etc/modprobe.d/
for f in pnp-aliases blacklist; do
if [[ -f $dir/$f && ! -f $dir/$f.conf ]]
@@ -337,13 +338,6 @@ pkg_preinst() {
rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug
fi
- # is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind)
- coldplug_stale=""
- if [[ -f ${ROOT}/etc/init.d/coldplug ]]
- then
- coldplug_stale="1"
- fi
-
has_version "=${CATEGORY}/${PN}-103-r3"
previous_equal_to_103_r3=$?
@@ -360,6 +354,7 @@ pkg_preinst() {
previous_less_than_146_r2=$?
}
+# 19 Nov 2008
fix_old_persistent_net_rules() {
local rules=${ROOT}/etc/udev/rules.d/70-persistent-net.rules
[[ -f ${rules} ]] || return
@@ -414,11 +409,18 @@ restart_udevd() {
fi
}
-pkg_postinst() {
- fix_old_persistent_net_rules
-
- restart_udevd
-
+postinst_init_scripts() {
+ # FIXME: we need some code like
+ # if use bootstrap; then
+ # add init-scripts
+ # fi
+ #
+ # FIXME: inconsistent handling of init-scripts here
+ # * udev is added to sysinit in openrc-ebuild
+ # * we add udev-postmount to default in here
+ #
+
+ # migration to >=openrc-0.4
if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]]
then
ewarn
@@ -430,20 +432,32 @@ pkg_postinst() {
ewarn
fi
- # people want reminders, I'll give them reminders. Odds are they will
- # just ignore them anyway...
-
- if [[ ${coldplug_stale} == 1 ]]
+ # add udev-postmount to default runlevel instead of that ugly injecting
+ # like a hotplug event, 2009/10/15
+ if [[ $previous_less_than_146_r2 = 0 ]]
then
- ewarn "A stale coldplug init script found. You should run:"
- ewarn
- ewarn " rc-update del coldplug"
- ewarn " rm -f /etc/init.d/coldplug"
- ewarn
- ewarn "udev now provides its own coldplug functionality."
+ local initd=udev-postmount
+
+ if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
+ [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
+ then
+ ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/default/${initd}
+ elog "Auto-adding '${initd}' service to your default runlevel"
+ fi
fi
+}
+
+pkg_postinst() {
+ fix_old_persistent_net_rules
+
+ restart_udevd
- # delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules
+ postinst_init_scripts
+
+ # people want reminders, I'll give them reminders. Odds are they will
+ # just ignore them anyway...
+
+ # delete 40-scsi-hotplug.rules, it is integrated in 50-udev.rules, 19 Jan 2007
if [[ $previous_equal_to_103_r3 = 0 ]] &&
[[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]]
then
@@ -452,26 +466,27 @@ pkg_postinst() {
rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules
fi
- # Removing some device-nodes we thought we need some time ago
+ # Removing some device-nodes we thought we need some time ago, 25 Jan 2007
if [[ -d ${ROOT}/lib/udev/devices ]]
then
rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom}
fi
- # Removing some old file
+ # Removing some old file, 29 Jan 2007
if [[ $previous_less_than_104_r5 = 0 ]]
then
rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev
rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null
fi
+ # 19 Mar 2007
if [[ $previous_less_than_106_r5 = 0 ]] &&
[[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]]
then
rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules
fi
- # Try to remove /etc/dev.d as that is obsolete
+ # Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007
if [[ -d ${ROOT}/etc/dev.d ]]
then
rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null
@@ -483,7 +498,7 @@ pkg_postinst() {
fi
# 64-device-mapper.rules now gets installed by sys-fs/device-mapper
- # remove it if user don't has sys-fs/device-mapper installed
+ # remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007
if [[ $previous_less_than_113 = 0 ]] &&
[[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
! has_version sys-fs/device-mapper
@@ -492,20 +507,6 @@ pkg_postinst() {
einfo "Removed unneeded file 64-device-mapper.rules"
fi
- # add udev-postmount to default runlevel instead of that ugly injecting
- # like a hotplug event, added 2009/10/15
- if [[ $previous_less_than_146_r2 = 0 ]]
- then
- local initd=udev-postmount
-
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]]
- then
- ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/default/${initd}
- elog "Auto-adding '${initd}' service to your default runlevel"
- fi
- fi
-
# requested in bug #275974, added 2009/09/05
ewarn
ewarn "If after the udev update removable devices or CD/DVD drives"