File: mkservices.conf.sh

package info (click to toggle)
fwanalog 0.6.9-8
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,004 kB
  • ctags: 25
  • sloc: sh: 1,541; makefile: 48
file content (15 lines) | stat: -rwxr-xr-x 462 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /bin/sh

# Creates a services.conf file for fwanalog from your /etc/services 
# or another file you specify
#
# $Id: mkservices.conf.sh,v 1.5 2002/04/28 13:36:15 bb Exp $

#services="/etc/services"
#services="/usr/share/nmap/nmap-services"
services="$1"

egrep '^[a-zA-Z0-9_:.-]+' $services \
	| perl -pwe 's!^([a-zA-Z0-9_.:*-]+)[ \t]+([0-9]+)/([a-zA-Z]+).*$!FILEALIAS REGEXPI:^/(.+)/$3/$2/\$ "/\$1/$3/$1 ($2)/"!' \
	| perl -pwe 's!\*!-!g' \
	> services.conf