summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ndc/ndcedit.awk
blob: 5bab219efc121704ef49932ca88956c557d9125c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# $Id: awkedit,v 1.1.1.1 1996/08/29 19:42:59 peter Exp $
NR == 3 {
	print "# If there is a global system configuration file, suck it in."
	print "if [ -f /etc/sysconfig ]; then"
	print "\t. /etc/sysconfig"
	print "fi\n"
}
{
	if ($1 == "named") {
		printf "\t\t# $namedflags is imported from /etc/sysconfig\n"
		printf "\t\tif [ \"X${namedflags}\" != \"XNO\" ]; then\n"
		printf "\t\t\tnamed ${namedflags} && {\n"
		getline
		printf "\t%s\n", $0
		getline
		printf "\t%s\n", $0
		getline
		printf "\t%s\n", $0
		printf "\t\tfi\n"
	} else {
		gsub(":/usr/ucb:", ":", $0);
		print;
	}
}
OpenPOWER on IntegriCloud