blob: b022c2438f5b395199f7a50cdf2757f07488ca5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/bin/bash
# sourcing our current rc.conf requires this to be a bash script
. /usr/lib/rc/functions
case "$1" in
start)
stat_busy "Starting nldev daemon"
mkdir /run/libudev-zero
bus create /run/udev-bus
bus chmod 644 /run/udev-bus
nldev -r /usr/bin/smdev &
echo $! > /run/nldev.pid
# Note: This is only needed for initialization, nldev will
# be controlled by runit on stage 2.
add_daemon nldev
stat_done nldev
;;
stop)
stat_busy "Stopping nldev"
# check whether nldev might still be running.
! pgrep -f "nldev" >/dev/null 2>&1 || killall nldev || stat_die nldev
rm_daemon nldev
stat_done nldev
;;
*)
echo "usage: $0 {start|stop}"
exit 1
;;
esac
|