Add logic to automatically restart inetd after processing changes.
This commit is contained in:
parent
0e3bab31f8
commit
832c182f1b
|
@ -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,ftp,tcp Ftp service
|
||||||
script:script1,telnet,tcp Telnet service
|
script:script1,telnet,tcp Telnet service
|
||||||
script:script1,shell,tcp Rshd/shell service
|
script:script1,shell,tcp Rshd/shell service
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/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 \
|
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 \
|
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"
|
INETDCONF="/etc/inetd.conf"
|
||||||
|
|
||||||
|
if [ "$1" = "YES" ]; then
|
||||||
|
restart=YES
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
|
||||||
IFS=" "
|
IFS=" "
|
||||||
CONF=`cat $INETDCONF`
|
CONF=`cat $INETDCONF`
|
||||||
echo "Processing $INETDCONF"
|
echo "Processing $INETDCONF"
|
||||||
|
@ -47,3 +52,7 @@ do
|
||||||
done
|
done
|
||||||
echo "Writing modified version to $INETDCONF"
|
echo "Writing modified version to $INETDCONF"
|
||||||
echo $CONF >$INETDCONF
|
echo $CONF >$INETDCONF
|
||||||
|
|
||||||
|
if [ "$restart" = "YES" ]; then
|
||||||
|
/etc/rc.d/inetd reload
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue