source: bootscripts-standard/boot-scripts/clfs/init.d/udev@ 4e4bd5f

Last change on this file since 4e4bd5f was 77aff82, checked in by William Harrington <kb0iic@…>, 11 years ago

Add directory housing the scripts for the boot-method currently used in the systemd book.

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[77aff82]1#!/bin/bash
2########################################################################
3# Begin $rc_base/init.d/udev
4#
5# Description : Udev Boot Script
6#
7# Authors : Based on Open Suse Udev Rules
8# kay.sievers@suse.de
9#
10# Adapted to : Jim Gifford
11# LFS : Alexander E. Patrakov
12#
13# Version : 00.00
14#
15# Notes :
16#
17########################################################################
18
19. /tools/etc/sysconfig/rc
20. ${rc_functions}
21
22case "$1" in
23 start)
24 echo "" > /sys/kernel/uevent_helper
25
26 # start udevd
27 boot_mesg "\nStarting udevd..."
28 /tools/sbin/udevd --daemon
29 evaluate_retval
30
31 # start coldplugging
32 boot_mesg "Performing Coldplugging..."
33
34 # unlikely, but we may be faster than the first event
35 #mkdir -p /run/.udev/queue
36
37 # configure all devices
38 /tools/sbin/udevadm trigger --action=add --type=subsystems
39 /tools/sbin/udevadm trigger --action=add --type=devices
40
41 # this replaces the old loop, exits after all devices are done
42 /tools/sbin/udevadm settle
43
44 echo_ok
45 ;;
46
47 stop)
48 boot_mesg "Stopping udevd..."
49 killproc /tools/sbin/udevd
50 ;;
51
52 restart)
53 boot_mesg "Restarting udevd..."
54 killproc /tools/sbin/udevd
55 loadproc /tools/sbin/udevd --daemon
56 evaluate_retval
57 ;;
58
59 status)
60 statusproc /tools/sbin/udevd
61 ;;
62
63 *)
64 echo "Usage: $0 {start|stop|restart|status|reload|force-reload}"
65 exit 1
66 ;;
67esac
Note: See TracBrowser for help on using the repository browser.