Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 2f050180e07ad13a3d8a199c58d0c542 > files > 20

proftpd-1.2.7-1mdk.ppc.rpm

#!/usr/bin/perl
# $Id: GetConf,v 1.3 2000/08/04 15:05:31 macgyver Exp $
#
# GetConf: Obtain a list of all ProFTPD configuration directives.
# Author: MacGyver aka Habeeb J. Dihu <macgyver@tos.net>
# Copyright(C) 1999, 2000, MacGyver.  All Rights Reserved.
#

use strict;

my $arg;

foreach $arg (sort @ARGV) {
    open(FILE, $arg) || die("Unable to open $arg: $!");
    
    while(<FILE>) {
	next unless /^\s*static\s*conftable\s*([^\s_]*)_.*/;

	print "Module $1:\n";
	
	while(<FILE>) {
	    last if /\}\;/;
	    
	    if(/\{\s*"(.*)".*\}/) {
		print "  $1\n";
	    }
	}
	
	print "\n";
    }
    
    close(FILE);
}