
Originally Posted by
Serpent
What is the problem with your xinetd?
Hi Serpent, I wish I'd know..
It seems that the service starts (there's a process), But the services that have to be started by xinetd (eg. vsftpd) will not start.
I'm 99% sure I've misconfigured something, but haven't had the the time to haunt that problem..
(problem for me was that I really need ftp, work related, so I installed proftpd, not as fast, but at least I have a FTP service running)
it might be something I don't see with my basic *nix knowledge, therefore I post the S10xinetd file (/opt/etc/init.d)
Code:
#! /bin/sh
#
# Startup script for xinetd
#
prefix=/opt
sbindir=${prefix}/sbin
NAME=xinetd
DAEMON=${sbindir}/${NAME}
DESC="xinetd"
PIDFILE="/var/run/xinetd.pid"
OPTIONS="-pidfile $PIDFILE"
CONFDIR="/opt/etc/xinetd.d"
# installation check
test -x ${DAEMON} || exit 0
case "$1" in
start)
if [ -z "`pidof ${NAME}`" ] ; then
printf "Starting ${DESC}: "
${DAEMON} ${OPTIONS}
printf "${NAME}.\n"
fi
;;
stop)
if [ -n "`pidof ${NAME}`" ]; then
printf "Stopping ${DESC}: "
kill -SIGTERM `cat $PIDFILE`
printf "${NAME}.\n"
for i in ${CONFDIR}/* ; do
if [ -n "`grep "^[[:space:]]*disable[[:space:]]*=[[:space:]]*no"
${i}`" ] ; then
daemon="`basename $(awk -F=
'/^[[:space:]]*server[[:space:]]*=[[:space:]]*.*/{print $2}' ${i})`"
printf "Stopping ${daemon}: "
kill "`pidof ${daemon}`" > /dev/null 2>&1
printf "${daemon}.\n"
fi
done
fi
;;
reload|reconfigure)
if [ -n "`pidof ${NAME}`" ]; then
printf "Reloading ${DESC}: "
kill -SIGHUP `cat $PIDFILE`
printf "${NAME}.\n"
fi
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
printf "Usage: $0
{start|stop|reload|reconfigure|restart|force-reload}\n" >&2
exit
;;
esac
exit 0
and my unslung
Code:
#! /bin/sh
# Start/stop all init scripts in /opt/etc/init.d
# starting them in numerical order and
# stopping them in reverse numerical order
#
if [ $# -ne 1 ]; then
printf "Usage: $0 {start|stop}\n" >&2
exit 1
fi
daemons=`echo $(/usr/bin/dirname $0)/S??*`
[ $1 = "stop" ] && daemons=`echo $daemons | /usr/bin/tr " " "\n" |
/usr/bin/sort -r`
for i in $daemons; do
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue
# Write to syslog
logger -t rc.unslung "$1 service $i"
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set $1
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i $1
;;
esac
done
right now.. I removed the vsftpd package, and the one in the firmware is also not working.
I've followed wengi's (section 10a from his tut.) advice on how to start 'something' (samba) with xinetd, but that didn't work, Samba wouldn't run, so I reverted to my old settings and samba did work again.