-
Notifications
You must be signed in to change notification settings - Fork 48
/
S12udev
executable file
·56 lines (40 loc) · 857 Bytes
/
S12udev
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
CONF="/etc/udev/udev.conf"
PROG="/sbin/udevd"
PROG_UA="/sbin/udevadm"
test -f ${PROG} || exit 0
test -s ${CONF} || exit 0
test -n "${OS_VERSION}" || source /etc/init.d/base
source ${CONF}
start() {
msg_begin "Starting eudev"
${PROG} --daemon --resolve-names=never
test $? == 0 && msg_done || msg_fail
${PROG_UA} trigger --type=subsystems --action=add
${PROG_UA} trigger --type=devices --action=add
${PROG_UA} settle --timeout=30
return 0
}
stop() {
msg_begin "Stopping eudev"
${PROG_UA} control --stop-exec-queue
killall -q $(basename ${PROG})
msg_done
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit $?