summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Larson <kergoth@gmail.com>2012-06-07 16:36:52 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-08 11:43:18 +0100
commitf822034e4fbe96e1ce443ab59de678b8ee760ff9 (patch)
tree2842d56b8b8cc0578456e292901539468a083951
parentfa3b18efecbc02029573deb00f03e7f278ea199c (diff)
downloadpoky-f822034e4fbe96e1ce443ab59de678b8ee760ff9.tar.gz
rpcbind: add and use startup script, move binaries
- Add init script from debian, tweaked for us - Move binaries from bindir to sbindir, as debian does (From OE-Core rev: 8576575ce9a1be8f7bec4e7c018d9be5c3b247df) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/init.d85
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb18
2 files changed, 101 insertions, 2 deletions
diff --git a/meta/recipes-extended/rpcbind/rpcbind/init.d b/meta/recipes-extended/rpcbind/rpcbind/init.d
new file mode 100644
index 0000000000..5c756bb523
--- /dev/null
+++ b/meta/recipes-extended/rpcbind/rpcbind/init.d
@@ -0,0 +1,85 @@
1#!/bin/sh
2#
3# start/stop rpcbind daemon.
4
5### BEGIN INIT INFO
6# Provides: rpcbind
7# Required-Start: $network
8# Required-Stop: $network
9# Default-Start: S 2 3 4 5
10# Default-Stop: 0 1 6
11# Short-Description: RPC portmapper replacement
12# Description: rpcbind is a server that converts RPC (Remote
13# Procedure Call) program numbers into DARPA
14# protocol port numbers. It must be running in
15# order to make RPC calls. Services that use
16# RPC include NFS and NIS.
17### END INIT INFO
18
19test -f /sbin/rpcbind || exit 0
20
21OPTIONS=""
22if [ -f /etc/default/rpcbind ]
23then
24 . /etc/default/rpcbind
25elif [ -f /etc/rpcbind.conf ]
26then
27 . /etc/rpcbind.conf
28fi
29
30start ()
31{
32 echo -n "Starting rpcbind daemon..."
33 if pidof /sbin/rpcbind >/dev/null; then
34 echo "already running."
35 exit 0
36 fi
37 start-stop-daemon --start --quiet --exec /sbin/rpcbind -- "$@"
38 if [ $? -eq 0 ]; then
39 echo "done."
40 else
41 echo "failed."
42 fi
43}
44
45stop ()
46{
47 echo "Stopping rpcbind daemon..."
48 if ! pidof /sbin/rpcbind >/dev/null; then
49 echo "not running."
50 exit 0
51 fi
52 start-stop-daemon --stop --quiet --exec /sbin/rpcbind
53 if [ $? -eq 0 ]; then
54 echo "done."
55 else
56 echo "failed."
57 fi
58}
59
60case "$1" in
61 start)
62 start $OPTIONS
63 ;;
64 stop)
65 stop
66 ;;
67 force-reload)
68 stop
69 start $OPTIONS
70 ;;
71 restart)
72 stop
73 start $OPTIONS
74 ;;
75 status)
76 pidof /sbin/rpcbind >/dev/null
77 exit $?
78 ;;
79 *)
80 echo "Usage: /etc/init.d/rpcbind {start|stop|force-reload|restart|status}"
81 exit 1
82 ;;
83esac
84
85exit 0
diff --git a/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
index 62f6667343..9fb4f5186f 100644
--- a/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
+++ b/meta/recipes-extended/rpcbind/rpcbind_0.2.0.bb
@@ -11,12 +11,26 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \
11 file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" 11 file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
12 12
13SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \ 13SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
14 file://init.d \
14 file://fix_host_path.patch \ 15 file://fix_host_path.patch \
15 " 16 "
16 17
17SRC_URI[md5sum] = "1a77ddb1aaea8099ab19c351eeb26316" 18SRC_URI[md5sum] = "1a77ddb1aaea8099ab19c351eeb26316"
18SRC_URI[sha256sum] = "c92f263e0353887f16379d7708ef1fb4c7eedcf20448bc1e4838f59497a00de3" 19SRC_URI[sha256sum] = "c92f263e0353887f16379d7708ef1fb4c7eedcf20448bc1e4838f59497a00de3"
19 20
20PR = "r2" 21PR = "r3"
21 22
22inherit autotools 23inherit autotools update-rc.d
24
25INITSCRIPT_NAME = "rpcbind"
26INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ."
27
28do_install_append () {
29 mv ${D}${bindir} ${D}${sbindir}
30
31 install -d ${D}${sysconfdir}/init.d
32 sed -e 's,/etc/,${sysconfdir}/,g' \
33 -e 's,/sbin/,${sbindir}/,g' \
34 ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind
35 chmod 0755 ${D}${sysconfdir}/init.d/rpcbind
36}