summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ndc
diff options
context:
space:
mode:
authorwosch <wosch@FreeBSD.org>1996-11-04 23:57:40 +0000
committerwosch <wosch@FreeBSD.org>1996-11-04 23:57:40 +0000
commitff98acfec90d368b9d6b2fed18b2dbb0f9dd03b5 (patch)
tree324f0c9fff3b26a541d5cf28c14252f6076e1997 /usr.sbin/ndc
parent224bcd3062b7320f86970b35c62a57a12aa95db4 (diff)
downloadFreeBSD-src-ff98acfec90d368b9d6b2fed18b2dbb0f9dd03b5.zip
FreeBSD-src-ff98acfec90d368b9d6b2fed18b2dbb0f9dd03b5.tar.gz
export PATH variable
Diffstat (limited to 'usr.sbin/ndc')
-rw-r--r--usr.sbin/ndc/ndcedit.awk15
1 files changed, 13 insertions, 2 deletions
diff --git a/usr.sbin/ndc/ndcedit.awk b/usr.sbin/ndc/ndcedit.awk
index 5bab219..ec5fd8d 100644
--- a/usr.sbin/ndc/ndcedit.awk
+++ b/usr.sbin/ndc/ndcedit.awk
@@ -1,5 +1,11 @@
-# $Id: awkedit,v 1.1.1.1 1996/08/29 19:42:59 peter Exp $
+# $Id: ndcedit.awk,v 1.1 1996/08/29 21:46:46 peter Exp $
NR == 3 {
+ print "#"
+ print "# This file is generated automatically, do not edit it here!"
+ print "# Please change src/usr.sbin/ndc/ndcedit.awk instead"
+ print "#"
+ print ""
+
print "# If there is a global system configuration file, suck it in."
print "if [ -f /etc/sysconfig ]; then"
print "\t. /etc/sysconfig"
@@ -18,7 +24,12 @@ NR == 3 {
printf "\t%s\n", $0
printf "\t\tfi\n"
} else {
- gsub(":/usr/ucb:", ":", $0);
+ if (/PATH=/) {
+ gsub(":/usr/ucb:", ":", $0);
+ if (!/export/) {
+ $0=$0"\nexport PATH";
+ }
+ }
print;
}
}
OpenPOWER on IntegriCloud