From 2203e654b389586650d553251b04544a34f189bf Mon Sep 17 00:00:00 2001 From: Sn4il Date: Mon, 2 Sep 2024 15:54:35 +0300 Subject: LFS 12.2 --- lfs-12.2-sysv/scripts/apds10.html | 155 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 lfs-12.2-sysv/scripts/apds10.html (limited to 'lfs-12.2-sysv/scripts/apds10.html') diff --git a/lfs-12.2-sysv/scripts/apds10.html b/lfs-12.2-sysv/scripts/apds10.html new file mode 100644 index 0000000..84f83fc --- /dev/null +++ b/lfs-12.2-sysv/scripts/apds10.html @@ -0,0 +1,155 @@ + + + + + + D.10. /etc/rc.d/init.d/udev_retry + + + + + + + + +

+ D.10. + /etc/rc.d/init.d/udev_retry +

+
+
#!/bin/sh
+########################################################################
+# Begin udev_retry
+#
+# Description : Udev cold-plugging script (retry)
+#
+# Authors     : Alexander E. Patrakov
+#               DJ Lucas - dj@linuxfromscratch.org
+# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
+#               Bryan Kadzban -
+#
+# Version     : LFS 7.0
+#
+########################################################################
+
+### BEGIN INIT INFO
+# Provides:            udev_retry
+# Required-Start:      udev
+# Should-Start:        $local_fs cleanfs
+# Required-Stop:
+# Should-Stop:
+# Default-Start:       S
+# Default-Stop:
+# Short-Description:   Replays failed uevents and creates additional devices.
+# Description:         Replays any failed uevents that were skipped due to
+#                      slow hardware initialization, and creates those needed
+#                      device nodes
+# X-LFS-Provided-By:   LFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+case "${1}" in
+   start)
+      log_info_msg "Retrying failed uevents, if any..."
+
+      rundir=/run/udev
+      # From Debian: "copy the rules generated before / was mounted
+      # read-write":
+
+      for file in ${rundir}/tmp-rules--*; do
+         dest=${file##*tmp-rules--}
+         [ "$dest" = '*' ] && break
+         cat $file >> /etc/udev/rules.d/$dest
+         rm -f $file
+      done
+
+      # Re-trigger the uevents that may have failed,
+      # in hope they will succeed now
+      /bin/sed -e 's/#.*$//' /etc/sysconfig/udev_retry | /bin/grep -v '^$' | \
+      while read line ; do
+         for subsystem in $line ; do
+            /bin/udevadm trigger --subsystem-match=$subsystem --action=add
+         done
+      done
+
+      # Now wait for udevd to process the uevents we triggered
+      if ! is_true "$OMIT_UDEV_RETRY_SETTLE"; then
+         /bin/udevadm settle
+      fi
+
+      evaluate_retval
+      ;;
+
+   *)
+      echo "Usage ${0} {start}"
+      exit 1
+      ;;
+esac
+
+exit 0
+
+# End udev_retry
+
+
+ + + -- cgit v1.2.3