recipes: tools/udevil: Add perp service to start devmon
[dragora.git] / archive / udevil / rc.main
blobe20964be0931504abcf153b7143803a8a77da9a4
1 #! /bin/sh -
3 # devmon/rc.main
5 # Device monitor (Udevil).
8 # Redirects the standard error to the standard output
9 exec 2>&1
11 TARGET="$1"
12 SVNAME="${2:-devmon}"
14 start()
16 echo "*** ${SVNAME}: Starting devmon ..."
17 exec /usr/bin/devmon --sync
20 reset()
22 case $3 in
23 exit)
24 echo "*** ${SVNAME}: Exited status $4"
26 signal)
27 echo "*** ${SVNAME}: Killed on signal $5"
30 echo "*** ${SVNAME}: Stopped (${3})"
32 esac
35 # Branch to target
36 eval ${TARGET} "$@"