forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-02-13 e440ec23c5a540cdd3f7464e8779219be6fd3d95
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
56
57
58
59
60
61
62
63
64
#!/bin/sh
#
# /etc/init.d/xinetd  --  script to start and stop xinetd.
 
# Source function library.
. /etc/init.d/functions
 
if test -f /etc/default/xinetd; then
   . /etc/default/xinetd
fi
 
 
test -x /usr/sbin/xinetd || exit 0
 
checkportmap () {
  if grep "^[^ *#]" /etc/xinetd.conf | grep -q 'rpc/'; then
    if ! rpcinfo -u localhost portmapper >/dev/null 2>&1; then
      echo
      echo "WARNING: portmapper inactive - RPC services unavailable!"
      echo "    Commenting out or removing the RPC services from"
      echo "    the /etc/xinetd.conf file will remove this message."
      echo
    fi
  fi
 
case "$1" in
    start)
        checkportmap
   echo -n "Starting internet superserver: xinetd"
   start-stop-daemon --start --quiet --background --exec /usr/sbin/xinetd -- -pidfile /var/run/xinetd.pid $XINETD_OPTS
   echo "."
   ;;
    stop)
   echo -n "Stopping internet superserver: xinetd"
   start-stop-daemon --stop --signal 3 --quiet --exec /usr/sbin/xinetd
   echo "."
   ;;
    status)
   status /usr/sbin/xinetd;
   exit $?
   ;;
    reload)
   echo -n "Reloading internet superserver configuration: xinetd"
   start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd
   echo "."
   ;;
    force-reload)
   echo "$0 force-reload: Force Reload is deprecated"
   echo -n "Forcefully reloading internet superserver configuration: xinetd"
   start-stop-daemon --stop --signal 1 --quiet --exec /usr/sbin/xinetd
   echo "."
   ;;
    restart)
   $0 stop
   $0 start
   ;;
    *)
   echo "Usage: /etc/init.d/xinetd {start|stop|status|reload|force-reload|restart}"
   exit 1
   ;;
esac
 
exit 0