1997-06-18 03:55:19 +02:00
|
|
|
# $Id: ndcedit.awk,v 1.5 1997/05/27 07:19:57 jkh Exp $
|
1996-08-29 23:46:46 +02:00
|
|
|
NR == 3 {
|
1996-11-05 00:57:40 +01:00
|
|
|
print "#"
|
|
|
|
print "# This file is generated automatically, do not edit it here!"
|
|
|
|
print "# Please change src/usr.sbin/ndc/ndcedit.awk instead"
|
|
|
|
print "#"
|
|
|
|
print ""
|
|
|
|
|
1996-08-29 23:46:46 +02:00
|
|
|
print "# If there is a global system configuration file, suck it in."
|
1997-05-27 09:19:57 +02:00
|
|
|
print "if [ -f /etc/rc.conf ]; then"
|
|
|
|
print "\t. /etc/rc.conf"
|
1996-08-29 23:46:46 +02:00
|
|
|
print "fi\n"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
if ($1 == "named") {
|
1997-06-18 03:55:19 +02:00
|
|
|
printf "\t\t# $named_flags is imported from /etc/rc.conf\n"
|
|
|
|
printf "\t\tif [ \"X${named_enable}\" = X\"YES\" ]; then\n"
|
1997-05-27 09:19:57 +02:00
|
|
|
printf "\t\t\tnamed ${named_flags} && {\n"
|
1996-08-29 23:46:46 +02:00
|
|
|
getline
|
|
|
|
printf "\t%s\n", $0
|
|
|
|
getline
|
|
|
|
printf "\t%s\n", $0
|
|
|
|
getline
|
|
|
|
printf "\t%s\n", $0
|
|
|
|
printf "\t\tfi\n"
|
|
|
|
} else {
|
1996-11-05 00:57:40 +01:00
|
|
|
if (/PATH=/) {
|
|
|
|
gsub(":/usr/ucb:", ":", $0);
|
|
|
|
if (!/export/) {
|
|
|
|
$0=$0"\nexport PATH";
|
|
|
|
}
|
|
|
|
}
|
1996-08-29 23:46:46 +02:00
|
|
|
print;
|
|
|
|
}
|
|
|
|
}
|