[packages] xinetd: update to 2.3.15 (CVE-2012-0862), use CONFIGURE_{ARGS,VARS} &...
[openwrt/svn-archive/archive.git] / net / xinetd / files / xinetd.init
index c11994bd475760c824daaf85717c497bb15f6c22..1437f587c52e3505a8c3af8b0fee98a0d9cb544e 100644 (file)
@@ -1,18 +1,15 @@
 #!/bin/sh /etc/rc.common
 # Copyright (C) 2006-2011 OpenWrt.org
+
 START=50
 
-DEFAULT=/etc/default/xinetd
-RUN_D=/var/run
-PID_F=$RUN_D/xinetd.pid
+SERVICE_USE_PID=1
 
 start() {
-       [ -f $DEFAULT ] && . $DEFAULT
-       [ -d $RUN_D ] || mkdir -p $RUN_D
-       xinetd -pidfile $PID_F $OPTIONS
+       service_start /usr/sbin/xinetd -pidfile /var/run/xinetd.pid
 }
 
 stop() {
-       [ -f $PID_F ] && kill $(cat $PID_F)
+       service_stop /usr/sbin/xinetd
 }