diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-06-03 17:16:00 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-06-03 17:16:00 +0000 |
commit | 8e38829079d10a998af9021992bd64fa6c2733d2 (patch) | |
tree | 767d46c2600fc6529bf3d9e8e7c0f94965d491c0 /usr.sbin | |
parent | 718804cb5327bebad3e3c45e41319adc7017138a (diff) |
snarf named_chroot out of rc.conf instead of using hard-coded chroot dir
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/named/ndc/ndc.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/named/ndc/ndc.sh b/usr.sbin/named/ndc/ndc.sh index 250fc966687..7d736677f0f 100644 --- a/usr.sbin/named/ndc/ndc.sh +++ b/usr.sbin/named/ndc/ndc.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: ndc.sh,v 1.8 1998/05/23 19:24:56 millert Exp $ +# $OpenBSD: ndc.sh,v 1.9 1998/06/03 17:15:59 millert Exp $ USAGE='echo \ "usage: $0 \ @@ -8,7 +8,12 @@ USAGE='echo \ "; exit 1' PATH=%DESTSBIN%:/bin:/usr/bin:/usr/ucb:$PATH -CHROOTDIR=%CHROOTDIR% + +if [ -r /etc/rc.conf ]; then + CHROOTDIR=`. /etc/rc.conf ; echo "$named_chroot"` +else + CHROOTDIR=%CHROOTDIR% +fi PIDFILE=${CHROOTDIR}/named.pid NAMED_CMD=named RUNNING=0 |