bge: Remove unused structs and macros
[dragonfly.git] / etc / rc.d / udevd
1 #!/bin/sh
2 # PROVIDE: udevd
3 # REQUIRE: mountcritlocal
4
5 . /etc/rc.subr
6
7 name="udevd"
8 rcvar=`set_rcvar`
9 pidfile="/var/run/${name}.pid"
10 command="/sbin/${name}"
11 start_cmd="udevd_start"
12
13 udevd_start()
14 {
15         # Avoid doing the hangup+resume maneuver if udevd is
16         # already running normally.
17         if [ ! -e /var/run/udevd.pid ]; then
18                 killall -HUP udevd &> /dev/null
19                 sleep 1
20         fi
21
22         # If udevd was running before but its stuff was under
23         # the mountpoints, it now should be in place and there
24         # is no need to run it again.
25         if [ ! -e /var/run/udevd.pid ]; then
26                 $command
27         fi
28 }
29
30 load_rc_config $name
31 run_rc_command "$1"