diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 13:48:23 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 13:48:23 +0200 |
commit | 1b6242fc583a6b871304fb995af6dc211b58f69b (patch) | |
tree | b5d434d90dedae24792906aa304897c23a134386 /recipes-core/numad/numad-0.6/numad.init.patch | |
download | meta-ip-1b6242fc583a6b871304fb995af6dc211b58f69b.tar.gz |
initial commit for Enea Linux 4.0daisy-enea
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'recipes-core/numad/numad-0.6/numad.init.patch')
-rw-r--r-- | recipes-core/numad/numad-0.6/numad.init.patch | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/recipes-core/numad/numad-0.6/numad.init.patch b/recipes-core/numad/numad-0.6/numad.init.patch new file mode 100644 index 0000000..c95f8d6 --- /dev/null +++ b/recipes-core/numad/numad-0.6/numad.init.patch | |||
@@ -0,0 +1,85 @@ | |||
1 | Fix source functions path. | ||
2 | Use start-stop-daemon. | ||
3 | |||
4 | Signed-off-by: Radu Patriu <radu.patriu@enea.com> | ||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Index: numad/numad.init | ||
8 | =================================================================== | ||
9 | --- numad.orig/numad.init 2014-03-13 15:27:26.000000000 +0200 | ||
10 | +++ numad/numad.init 2014-03-13 16:39:13.089952014 +0200 | ||
11 | @@ -6,13 +6,13 @@ | ||
12 | ### BEGIN INIT INFO | ||
13 | # Provides: numad | ||
14 | # Required-Start: cgconfig | ||
15 | -# Required-Stop: | ||
16 | -# Should-Start: | ||
17 | -# Should-Stop: | ||
18 | -# Default-Start: | ||
19 | -# Default-Stop: | ||
20 | +# Required-Stop: | ||
21 | +# Should-Start: | ||
22 | +# Should-Stop: | ||
23 | +# Default-Start: | ||
24 | +# Default-Stop: | ||
25 | # Short-Description: numad control | ||
26 | -# Description: | ||
27 | +# Description: | ||
28 | ### END INIT INFO | ||
29 | |||
30 | if [ $(id -u) -ne 0 ]; then | ||
31 | @@ -21,7 +21,7 @@ | ||
32 | fi | ||
33 | |||
34 | # Source function library. | ||
35 | -. /etc/rc.d/init.d/functions | ||
36 | +. /etc/init.d/functions | ||
37 | |||
38 | exec="/usr/bin/numad" | ||
39 | prog="numad" | ||
40 | @@ -29,32 +29,36 @@ | ||
41 | |||
42 | [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog | ||
43 | |||
44 | -lockfile=/var/lock/subsys/$prog | ||
45 | -base=${0##*/} | ||
46 | - | ||
47 | start() { | ||
48 | [ -x $exec ] || exit 5 | ||
49 | [ -f $config ] || exit 6 | ||
50 | echo -n $"Starting $prog: " | ||
51 | . $config | ||
52 | - daemon "$exec -i $INTERVAL" | ||
53 | + start-stop-daemon --start --quiet --exec $exec -- -i $INTERVAL -D $DIRECTORY_MOUNT_POINT | ||
54 | retval=$? | ||
55 | - echo | ||
56 | - [ $retval -eq 0 ] && touch $lockfile | ||
57 | + if [ $retval -eq 0 ] ; then | ||
58 | + echo "OK" | ||
59 | + else | ||
60 | + echo "FAIL" | ||
61 | + fi | ||
62 | return $retval | ||
63 | } | ||
64 | |||
65 | stop() { | ||
66 | echo -n $"Stopping $prog: " | ||
67 | - killproc $prog | ||
68 | + start-stop-daemon --stop --quiet --exec $exec | ||
69 | retval=$? | ||
70 | - echo | ||
71 | - [ $retval -eq 0 ] && rm -f $lockfile | ||
72 | + if [ $retval -eq 0 ] ; then | ||
73 | + echo "OK" | ||
74 | + else | ||
75 | + echo "FAIL" | ||
76 | + fi | ||
77 | return $retval | ||
78 | } | ||
79 | |||
80 | restart() { | ||
81 | stop | ||
82 | + sleep 1 | ||
83 | start | ||
84 | } | ||
85 | |||