Date: Fri, 3 Aug 2001 13:23:19 +0200 From: Jim Segrave <jes@jes-2.demon.nl> To: stable@FreeBSD.ORG Subject: Re: Patch to modify default inetd.conf, have sysinstall prompt... Message-ID: <20010803132319.A90860@jes-2.demon.nl> In-Reply-To: <bulk.15338.20010801131338@hub.freebsd.org>; from "stable-digest" on Wed 01 Aug 2001 (13:13 -0700) References: <bulk.15338.20010801131338@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Wed, 1 Aug 2001 09:05:56 -0400 (EDT) > From: Robert Watson <rwatson@FreeBSD.ORG> > Subject: Re: Patch to modify default inetd.conf, have sysinstall prompt to edit , inetd.conf > > On Tue, 31 Jul 2001, Mike Porter wrote: [snip] > This is true--however, the inetd.conf file doesn't lend itself to > automated management, as it doesn't have an inline "disabled" flag. To > disable a service, you comment it out, making it hard for a program to > distinguish things which are legitimately comments, and things that are > disabled services. In the long term, it would probably make sense to > develop some sort of administrative tool for inetd.conf: however, I > concluded that doing so prior to 4.4-RELEASE was unlikely, and opted for > this. In the future, if such a tool is developed, I'd be happy to slot it > in instead of invoking EDITOR on it :-). > allowing it to either be manually enabled, or enabled by virtue of > dependencies (something we already support). I think it's trivial to distinguish services from comments - Perl regex: $commented_line =~ /^#+\s*(\S+)\s+(stream|dgram|raw|rdm|seqpacket)/; $service_name = $1; $active_service =~ /^(\S+)\s+(stream|dgram|raw|rdm|seqpacket)/; $service_name = $1; This is enough to let you parse a file and find all the services which are enabled or not. It should be a SMOP to have a little perl script to take the user through a list of services likely to be wanted and get a yes/no for each one, then go through the inetd.conf and ensure that all non-wanted services are commented out and wanted ones are uncommented if need be. -- Jim Segrave jes@jes-2.demon.nl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010803132319.A90860>