From 832c182f1bab6a1982039db4619b61b557c5dd9b Mon Sep 17 00:00:00 2001 From: garbled Date: Wed, 1 Aug 2001 08:11:33 +0000 Subject: [PATCH] Add logic to automatically restart inetd after processing changes. --- share/sushi/system/inetdconf/form | 3 ++- share/sushi/system/inetdconf/script | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/share/sushi/system/inetdconf/form b/share/sushi/system/inetdconf/form index f38d869409f3..7491bf366bf3 100644 --- a/share/sushi/system/inetdconf/form +++ b/share/sushi/system/inetdconf/form @@ -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 diff --git a/share/sushi/system/inetdconf/script b/share/sushi/system/inetdconf/script index 4d313f9f2826..8d9cb1be27c0 100755 --- a/share/sushi/system/inetdconf/script +++ b/share/sushi/system/inetdconf/script @@ -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