aboutsummaryrefslogtreecommitdiffstats
path: root/bootscripts/contrib/lsb-v3/init.d/udev_retry
diff options
context:
space:
mode:
authorBruce Dubbs <bdubbs@linuxfromscratch.org>2008-06-03 21:51:14 +0000
committerBruce Dubbs <bdubbs@linuxfromscratch.org>2008-06-03 21:51:14 +0000
commit1c4800743d22d675ccfa48364d8aa558e8b7407c (patch)
treeca4254cbe5dd5adb0ed8af1f87c26bc569403164 /bootscripts/contrib/lsb-v3/init.d/udev_retry
parent9faa3e27afb932894ace74854fbb76631022446b (diff)
Moved bootscripts and udev-config to BOOK
Updated Makefile to automatically generate bootscript and udev-config tarballs Updated licesnse to be the same as BLFS git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8548 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'bootscripts/contrib/lsb-v3/init.d/udev_retry')
-rw-r--r--bootscripts/contrib/lsb-v3/init.d/udev_retry51
1 files changed, 51 insertions, 0 deletions
diff --git a/bootscripts/contrib/lsb-v3/init.d/udev_retry b/bootscripts/contrib/lsb-v3/init.d/udev_retry
new file mode 100644
index 000000000..b87a7b3e9
--- /dev/null
+++ b/bootscripts/contrib/lsb-v3/init.d/udev_retry
@@ -0,0 +1,51 @@
+#!/bin/sh
+# Begin $rc_base/init.d/udev_retry
+
+### BEGIN INIT INFO
+# Provides: udev_retry
+# Required-Start: udev
+# Should-Start: $local_fs
+# Required-Stop:
+# Should-Stop:
+# Default-Start: sysinit
+# Default-Stop:
+# Short-Description: Replays failed uevents and creates additonal devices.
+# Description: Replays any failed uevents that were skipped due to
+# slow hardware initialization, and creates those needed
+# device nodes
+# X-LFS-Default-Start: S45
+# X-LFS-Default-Stop:
+# X-LFS-Provided-By: LFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+MESSAGE="Retrying failed uevents, if any..."
+
+case "${1}" in
+ start)
+
+ # From Debian: "copy the rules generated before / was mounted
+ # read-write":
+ for file in /dev/.udev/tmp-rules--*; do
+ dest=${file##*tmp-rules--}
+ [ "$dest" = '*' ] && break
+ cat $file >> /etc/udev/rules.d/$dest
+ rm -f $file
+ done
+
+ # Re-trigger the failed uevents in hope they will succeed now
+ /sbin/udevadm trigger --retry-failed
+
+ # Now wait for udevd to process the uevents we triggered
+ /sbin/udevadm settle
+ evaluate_retval standard
+ ;;
+
+ *)
+ echo "Usage ${0} {start}"
+ exit 1
+ ;;
+esac
+
+# End $rc_base/init.d/udev_retry