diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-extended/xinetd/xinetd/xinetd.init | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-extended/xinetd/xinetd/xinetd.init')
-rw-r--r-- | meta/recipes-extended/xinetd/xinetd/xinetd.init | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.init b/meta/recipes-extended/xinetd/xinetd/xinetd.init new file mode 100644 index 0000000000..777c2c8b46 --- /dev/null +++ b/meta/recipes-extended/xinetd/xinetd/xinetd.init | |||
@@ -0,0 +1,64 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # /etc/init.d/xinetd -- script to start and stop xinetd. | ||
4 | |||
5 | # Source function library. | ||
6 | . /etc/init.d/functions | ||
7 | |||
8 | if test -f /etc/default/xinetd; then | ||
9 | . /etc/default/xinetd | ||
10 | fi | ||
11 | |||
12 | |||
13 | test -x /usr/sbin/xinetd || exit 0 | ||
14 | |||
15 | checkportmap () { | ||
16 | if grep "^[^ *#]" /etc/xinetd.conf | grep -q 'rpc/'; then | ||
17 | if ! rpcinfo -u localhost portmapper >/dev/null 2>&1; then | ||
18 | echo | ||
19 | echo "WARNING: portmapper inactive - RPC services unavailable!" | ||
20 | echo " Commenting out or removing the RPC services from" | ||
21 | echo " the /etc/xinetd.conf file will remove this message." | ||
22 | echo | ||
23 | fi | ||
24 | fi | ||
25 | } | ||
26 | |||
27 | case "$1" in | ||
28 | start) | ||
29 | checkportmap | ||
30 | echo -n "Starting internet superserver: xinetd" | ||
31 | start-stop-daemon --start --quiet --background --exec /usr/sbin/xinetd -- -pidfile /var/run/xinetd.pid $XINETD_OPTS | ||
32 | echo "." | ||
33 | ;; | ||
34 | stop) | ||
35 | echo -n "Stopping internet superserver: xinetd" | ||
36 | start-stop-daemon --stop --signal 3 --quiet --exec /usr/sbin/xinetd | ||
37 | echo "." | ||
38 | ;; | ||
39 | status) | ||
40 | status /usr/sbin/xinetd; | ||
41 | exit $? | ||
42 | ;; | ||
43 | reload) | ||
44 | echo -n "Reloading internet superserver configuration: xinetd" | ||
45 | start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd | ||
46 | echo "." | ||
47 | ;; | ||
48 | force-reload) | ||
49 | echo "$0 force-reload: Force Reload is deprecated" | ||
50 | echo -n "Forcefully reloading internet superserver configuration: xinetd" | ||
51 | start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd | ||
52 | echo "." | ||
53 | ;; | ||
54 | restart) | ||
55 | $0 stop | ||
56 | $0 start | ||
57 | ;; | ||
58 | *) | ||
59 | echo "Usage: /etc/init.d/xinetd {start|stop|status|reload|force-reload|restart}" | ||
60 | exit 1 | ||
61 | ;; | ||
62 | esac | ||
63 | |||
64 | exit 0 | ||