Add logic to automatically restart inetd after processing changes.

This commit is contained in:
garbled 2001-08-01 08:11:33 +00:00
parent 0e3bab31f8
commit 832c182f1b
2 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,5 @@
# $NetBSD: form,v 1.1 2001/03/06 21:18:42 garbled Exp $
# $NetBSD: form,v 1.2 2001/08/01 08:11:33 garbled Exp $
list:YES,NO Restart inetd?
script:script1,ftp,tcp Ftp service
script:script1,telnet,tcp Telnet service
script:script1,shell,tcp Rshd/shell service

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $NetBSD: script,v 1.1 2001/03/06 21:18:42 garbled Exp $
# $NetBSD: script,v 1.2 2001/08/01 08:11:33 garbled Exp $
BIGLIST="ftp,tcp telnet,tcp shell,tcp login,tcp exec,tcp uucpd,tcp nntp,tcp \
finger,tcp ident,tcp tftp,udp comsat,udp ntalk,udp bootps,udp hunt,udp \
@ -12,6 +12,11 @@ kpasswd,udp6 rstatd/1-3,rpc/udp6 rusersd/2-3,rpc/udp6"
INETDCONF="/etc/inetd.conf"
if [ "$1" = "YES" ]; then
restart=YES
fi
shift
IFS=" "
CONF=`cat $INETDCONF`
echo "Processing $INETDCONF"
@ -47,3 +52,7 @@ do
done
echo "Writing modified version to $INETDCONF"
echo $CONF >$INETDCONF
if [ "$restart" = "YES" ]; then
/etc/rc.d/inetd reload
fi